   <!--良品条件板块-->
<!--用户权限说明-->
<!--采用3位编码制(第1位：科室；第2位：所操作页面/表单；第3位：操作权限)；如111：代表品质技术科 量检具点检表 管理员-->
<!--管理员：代码：1，可以做所有的操作-->
<template>
  <div style="margin: 0;padding: 0">
    <el-container>
      <!--页面表头设计-->
      <el-header style="height: 39px">
        <el-link class="headMain" href="http://10.255.96.48:3404/">{{main.qualityManagementSystem}}</el-link>
          <span class="center-text">{{main.goodProductConditions}}</span>
        <el-popover
            placement="top-start"
            title="用户信息"
            width="200"
            trigger="hover">
          <div style="margin-top: 10px">Name：{{useName}}</div>
          <div style="margin-top: 10px">ID:{{useId}}</div>
          <div style="margin-top: 10px" @click="logOut"><el-link>退出</el-link></div>
          <div class="headMain" slot="reference">{{useName}}</div>
        </el-popover>
      </el-header>
      <el-container>
        <el-aside class="el-aside" width="200px" style="height: 90vh">
          <el-tree
              :data="projectList"
              props="defaultProps"
              accordion
              @node-click="clickTree">
          </el-tree>
        </el-aside>
        <el-container>
          <!--主题设计-->
          <el-main class="el-main" style="height: calc(80vh - 83px);overflow: auto">
            <div v-if="selectTree !== -1">
              <!-------------------------------品管量检具----------------------------------->
              <el-tabs v-model="activeName" @tab-click="handleClick" v-if="selectTree===0">
                <!--量检具基本信息-->
                <el-tab-pane :label="main.basicInformation" name="measuringToolsBasicInformation">
                  <div style="text-align: right;" >
                    <el-form :inline="true" @submit.prevent>
                      <!--编号-->
                      <el-form-item :label="pageVal.measuringToolsList.number">
                        <el-input v-model="number" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <el-button type="primary" size="mini" @click="handleFilterMeasuringTool" style="margin-top: 8px">
                        <i class="el-icon-search"></i>
                      </el-button>
                      <el-button size="mini" @click="resetFilterMeasuringTool">
                        <i class="el-icon-refresh"></i>
                      </el-button>
                      <el-button type="success" size="mini" @click="measuringToolsListEditShow(1, null)" v-if="usePower===111">
                        <i class="el-icon-plus"></i>
                      </el-button>
                    </el-form>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="filteredMeasuringToolsListData"
                        style="width: 100%"
                        :height="measuringToolsListHeight"
                        border
                        highlight-current-row> <!-- 设置表头行高度 -->>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>

                      <!-- 编号 -->
                      <el-table-column
                          prop="number"
                          :label="pageVal.measuringToolsList.number"
                          width="125"
                          align="center">
                      </el-table-column>

                      <!-- 名称(中) -->
                      <el-table-column
                          prop="name"
                          :label="pageVal.measuringToolsList.name"
                          width="145"
                          align="center">
                      </el-table-column>

                      <!-- 名称(英) -->
                      <el-table-column
                          prop="name_english"
                          :label="pageVal.measuringToolsList.name_english"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 名称(俄) -->
                      <el-table-column
                          prop="name_russian"
                          :label="pageVal.measuringToolsList.name_russian"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 规格型号 -->
                      <el-table-column
                          prop="specification"
                          :label="pageVal.measuringToolsList.specification"
                          width="180"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 是否点检 -->
                      <el-table-column
                          prop="is_checked"
                          :label="pageVal.measuringToolsList.is_checked"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 点检频次 -->
                      <el-table-column
                          prop="inspection_frequency"
                          :label="pageVal.measuringToolsList.inspection_frequency"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 是否校准 -->
                      <el-table-column
                          prop="is_calibration"
                          :label="pageVal.measuringToolsList.is_calibration"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 校准周期 -->
                      <el-table-column
                          prop="calibration_cycle"
                          :label="pageVal.measuringToolsList.calibration_cycle"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 标准值 -->
                      <el-table-column
                          prop="standard_value"
                          :label="pageVal.fixtureTechnicalCondition.standard_value"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 上公差 -->
                      <el-table-column
                          prop="upper_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 下公差 -->
                      <el-table-column
                          prop="lower_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 机型 -->
                      <el-table-column
                          prop="engine_model"
                          :label="pageVal.fixtureTechnicalCondition.engine_model"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 使用部门 -->
                      <el-table-column
                          prop="section"
                          :label="pageVal.measuringToolsList.section"
                          width="120"
                          align="center"
                          v-slot:default="scope">
                      <span
                          v-if="languageS==='chinese' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[0]}}
                      </span>
                        <span
                            v-else-if="languageS==='english' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[1]}}
                      </span>
                        <span
                            v-else-if="languageS==='russian' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[2]}}
                      </span>
                        <span
                            v-else>
                        {{scope.row.section}}
                      </span>
                      </el-table-column>

                      <!-- 分组 -->
                      <el-table-column
                          prop="group"
                          :label="pageVal.measuringToolsList.group"
                          width="120"
                          align="center"
                          v-slot:default="scope"
                          sortable>
                      <span
                          v-if="languageS==='chinese' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[0]}}
                      </span>
                        <span
                            v-else-if="languageS==='english' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[1]}}
                      </span>
                        <span
                            v-else-if="languageS==='russian' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[2]}}
                      </span>
                        <span
                            v-else>
                        {{scope.row.group}}
                      </span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="measuringToolsListEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteMeasuringToolsListOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                        <el-link @click="qrCodeShow(scope.row)">
                          <i class="el-icon-s-grid"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>

                <!--量检具点检管理-->
                <el-tab-pane :label="main.inspectionManagement" name="measuringToolsInspectionManagement">
                  <div style="display: flex; justify-content: space-between; align-items: center">
                    <el-button
                        text-align="left"
                        size="mini"
                        style="background: yellowgreen; font-weight: bold; font-size: 14px"
                        @click="startCheckDialogShow">
                      {{pageVal.startCheck1}}
                    </el-button>
                    <div>
                      <!--时间选择器-->
                      <el-date-picker
                          size="mini"
                          style="width: 125px; margin-right: 10px"
                          v-model="dateSelect"
                          type="date"
                          :placeholder="main.selectDate"
                          value-format="yyyy-MM-dd"
                          format="yyyy-MM-dd">
                      </el-date-picker>
                      <!--班次选择器-->
                      <el-select
                          v-model="shiftSelect"
                          :placeholder="main.selectShift"
                          size="mini"
                          style="width: 230px">
                        <el-option
                            v-for="item in shiftOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                        </el-option>
                      </el-select>
                    </div>
                  </div>
                  <div style="display: flex; width: 99.6%; border: 1px solid #ccc;margin-top: 5px;">
                    <div style="flex: 1; border-right: 1px solid #ccc; padding: 8px">
                      <el-table
                          :data="measuringToolChecklistData"
                          style="width: 99.5%"
                          :height="measuringToolChecklistHeight"
                          border
                          highlight-current-row> <!-- 设置表头行高度 -->>

                        <!-- 序号 -->
                        <el-table-column
                            :label="pageVal.measuringToolChecklist.order"
                            width="60"
                            align="center"
                            v-slot:default="scope">
                          {{scope.$index+1}}
                        </el-table-column>

                        <!-- 编号 -->
                        <el-table-column
                            prop="number"
                            :label="pageVal.measuringToolChecklist.number"
                            width="135"
                            align="center"
                            sortable>
                        </el-table-column>

                        <!-- 名称(中) -->
                        <el-table-column
                            prop="name"
                            :label="pageVal.measuringToolChecklist.name"
                            width="140"
                            align="center"
                            v-slot:default="scope">
                          <span v-if="languageS==='chinese'">{{scope.row.name}}</span>
                          <span v-if="languageS==='english'">{{scope.row.name_english}}</span>
                          <span v-if="languageS==='russian'">{{scope.row.name_russian}}</span>
                        </el-table-column>

                        <!-- 点检频次 -->
                        <el-table-column
                            prop="inspection_frequency"
                            :label="pageVal.measuringToolChecklist.inspection_frequency"
                            width="100"
                            align="center"
                            sortable>
                        </el-table-column>

                        <!-- 是否合格 -->
                        <el-table-column
                            prop="is_qualified"
                            :label="pageVal.measuringToolChecklist.is_qualified"
                            width="80"
                            align="center"
                            sortable>
                        </el-table-column>

                        <!-- 异常描述 -->
                        <el-table-column
                            prop="abnormal_description"
                            :label="pageVal.measuringToolChecklist.abnormal_description"
                            align="center"
                            v-slot:default="scope">
                        <span v-if="scope.row.abnormal_description==='' || scope.row.abnormal_description===undefined || scope.row.abnormal_description===null">
                          ————
                        </span>
                          <span v-else>
                          {{scope.row.abnormal_description}}
                        </span>
                        </el-table-column>

                        <!-- 点检日期 -->
                        <el-table-column
                            prop="create_time"
                            :label="pageVal.measuringToolChecklist.create_time"
                            width="100"
                            align="center"
                            sortable>
                        </el-table-column>

                        <el-table-column
                            :label="main.edit"
                            align="center"
                            v-slot:default="scope"
                            v-if="usePower===111"
                            width="50">
                          <el-link @click="deleteDataShow('deleteMeasuringToolsChecklistOneRow',scope)">
                            <i class="el-icon-delete"></i>
                          </el-link>
                        </el-table-column>
                      </el-table>
                    </div>
                    <div style="width: 258px;padding: 8px">
                      <el-table
                          :data="measuringToolCheckResult"
                          border
                          highlight-current-row
                          :height="measuringToolChecklistHeight">
                        <!-- 点检频次 -->
                        <el-table-column
                            prop="frequency"
                            :label="pageVal.measuringToolChecklist.frequency"
                            align="center"
                            width="77">
                        </el-table-column>

                        <!-- 应点检 -->
                        <el-table-column
                            prop="shouldCheck"
                            :label="pageVal.measuringToolChecklist.shouldCheck"
                            align="center"
                            width="73">
                        </el-table-column>

                        <!-- 实际点检 -->
                        <el-table-column
                            prop="actualCheck"
                            :label="pageVal.measuringToolChecklist.actualCheck"
                            align="center"
                            width="77"
                            v-slot:default="scope">
                          <el-link @click="uncheckedMeasuringToolsShow(scope)">{{scope.row.actualCheck}}</el-link>
                        </el-table-column>

                      </el-table>
                    </div>
                  </div>
                </el-tab-pane>

                <!--量检具校准管理-->
                <el-tab-pane :label="main.calibrationManagement" name="measuringToolsCalibrationManagement">
                  <div style="text-align: left;overflow-x: auto">
                    <el-form :inline="true" @submit.prevent>
                      <!--编号-->
                      <el-form-item :label="pageVal.measuringToolsList.number">
                        <el-input v-model="number" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <el-button type="primary" size="mini" @click="handleFilterMeasuringToolCalibration" style="margin-top: 8px">
                        <i class="el-icon-search"></i>
                      </el-button>
                      <el-button size="mini" @click="resetFilterMeasuringToolCalibration">
                        <i class="el-icon-refresh"></i>
                      </el-button>
                    </el-form>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="filteredCalibrationRecordData"
                        style="width: 100%"
                        :height="calibrationRecordHeight"
                        border
                        highlight-current-row> <!-- 设置表头行高度 -->>

                      <!-- 序号 -->
                      <el-table-column
                          fixed
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>

                      <!-- 编号 -->
                      <el-table-column
                          fixed
                          prop="number"
                          :label="pageVal.measuringToolsList.number"
                          width="125"
                          align="center">
                      </el-table-column>

                      <!-- 名称(中) -->
                      <el-table-column
                          prop="name"
                          :label="pageVal.measuringToolsList.name"
                          width="145"
                          align="center">
                      </el-table-column>

                      <!-- 名称(英) -->
                      <el-table-column
                          prop="name_english"
                          :label="pageVal.measuringToolsList.name_english"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 名称(俄) -->
                      <el-table-column
                          prop="name_russian"
                          :label="pageVal.measuringToolsList.name_russian"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 规格型号 -->
                      <el-table-column
                          prop="specification"
                          :label="pageVal.measuringToolsList.specification"
                          width="180"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 标准值 -->
                      <el-table-column
                          prop="standard_value"
                          :label="pageVal.fixtureTechnicalCondition.standard_value"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 上公差 -->
                      <el-table-column
                          prop="upper_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 下公差 -->
                      <el-table-column
                          prop="lower_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 校准周期 -->
                      <el-table-column
                          prop="calibration_cycle"
                          :label="pageVal.measuringToolsList.calibration_cycle"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 分组 -->
                      <el-table-column
                          prop="group"
                          :label="pageVal.measuringToolsList.group"
                          width="120"
                          align="center"
                          v-slot:default="scope"
                          sortable>
                      <span
                          v-if="languageS==='chinese' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[0]}}
                      </span>
                        <span
                            v-else-if="languageS==='english' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[1]}}
                      </span>
                        <span
                            v-else-if="languageS==='russian' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
                        {{scope.row.group.split('/')[2]}}
                      </span>
                        <span
                            v-else>
                        {{scope.row.group}}
                      </span>
                      </el-table-column>

                      <!-- 校准结果 -->
                      <el-table-column
                          prop="calibration_result"
                          :label="pageVal.calibrationRecordList.calibration_result"
                          width="120"
                          align="center"
                          v-slot:default="scope">
                      <span
                          v-if="languageS==='chinese' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[0]}}
                      </span>
                        <span
                            v-else-if="languageS==='english' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[1]}}
                      </span>
                        <span
                            v-else-if="languageS==='russian' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[2]}}
                      </span>
                        <span
                            v-else>
                        {{scope.row.calibration_result}}
                      </span>
                      </el-table-column>

                      <!-- 校准值 -->
                      <el-table-column
                          prop="calibration_value"
                          :label="pageVal.calibrationRecordList.calibration_value"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 校准日期 -->
                      <el-table-column
                          prop="calibration_date"
                          :label="pageVal.calibrationRecordList.calibration_date"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 下次校准日期 -->
                      <el-table-column
                          prop="next_calibration_date"
                          :label="pageVal.calibrationRecordList.next_calibration_date"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 历史校准信息 -->
                      <el-table-column
                          prop="historical_information"
                          :label="pageVal.calibrationRecordList.historical_information"
                          width="120"
                          align="center"
                          v-slot:default="scope">
                        <el-link style="font-size: 27px; margin-right: 15px" @click="historicalInformationShow(scope)">
                          <i class="el-icon-s-order"></i>
                        </el-link>
                        <el-link style="font-size: 27px;">
                          <i class="el-icon-data-line"></i>
                        </el-link>
                      </el-table-column>

                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="calibrationRecordListEditShow(1,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="calibrationRecordListEditShow(2,scope)">
                          <i class="el-icon-circle-plus-outline"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>

                <!--纠正预防-->
                <el-tab-pane :label="main.correctAndPrevent" name="correctAndPrevent">
                  <div>
                    <el-table
                        :data="correctAndPreventData"
                        style="width: 100%"
                        :height="correctAndPreventHeight"
                        border
                        highlight-current-row>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>

                      <!-- 问题分类 -->
                      <el-table-column
                          prop="question_classification"
                          :label="pageVal.correctAndPrevent.question_classification"
                          width="125"
                          align="center">
                      </el-table-column>

                      <!-- 问题来源 -->
                      <el-table-column
                          prop="question_source"
                          :label="pageVal.correctAndPrevent.question_source"
                          width="145"
                          align="center">
                      </el-table-column>

                      <!-- 来源分类 -->
                      <el-table-column
                          prop="source_classification"
                          :label="pageVal.correctAndPrevent.source_classification"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 责任部门 -->
                      <el-table-column
                          prop="department"
                          :label="pageVal.correctAndPrevent.department"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 问题描述 -->
                      <el-table-column
                          prop="question_description"
                          :label="pageVal.correctAndPrevent.question_description"
                          width="180"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 产生时间 -->
                      <el-table-column
                          prop="generation_time"
                          :label="pageVal.correctAndPrevent.generation_time"
                          width="80"
                          align="center">
                      </el-table-column>

                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="correctAndPreventEditShow(1,scope)">
                          <i class="el-icon-view"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="correctAndPreventEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteCorrectAndPreventOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>

                <!--问题清单-->
                <el-tab-pane :label="main.questionList" name="questionList">
                  <div :key="componentKey">
                    <el-table
                        :data="questionListData"
                        style="width: 100%"
                        :height="questionListHeight"
                        border
                        highlight-current-row>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>

                      <!-- 问题分类 -->
                      <el-table-column
                          prop="question_classification"
                          :label="pageVal.correctAndPrevent.question_classification"
                          width="125"
                          align="center">
                      </el-table-column>

                      <!-- 问题来源 -->
                      <el-table-column
                          prop="question_source"
                          :label="pageVal.correctAndPrevent.question_source"
                          width="145"
                          align="center">
                      </el-table-column>

                      <!-- 来源分类 -->
                      <el-table-column
                          prop="source_classification"
                          :label="pageVal.correctAndPrevent.source_classification"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 责任部门 -->
                      <el-table-column
                          prop="department"
                          :label="pageVal.correctAndPrevent.department"
                          width="155"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 问题描述 -->
                      <el-table-column
                          prop="question_description"
                          :label="pageVal.correctAndPrevent.question_description"
                          width="180"
                          align="center"
                          :show-overflow-tooltip="true">
                        <template #default="scope">
                          <span
                              class="clickable-text"
                              @click="questionDescriptionShow(scope.row)">
                            {{ scope.row.question_description }}
                          </span>
                        </template>
                      </el-table-column>

                      <!-- 产生时间 -->
                      <el-table-column
                          prop="generation_time"
                          :label="pageVal.correctAndPrevent.generation_time"
                          width="100"
                          align="center">
                      </el-table-column>

                      <!-- 纠正人 -->
                      <el-table-column
                          prop="correct_person"
                          :label="pageVal.questionList.correct_person"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 纠正时间 -->
                      <el-table-column
                          prop="correct_time"
                          :label="pageVal.questionList.correct_time"
                          width="100"
                          align="center">
                      </el-table-column>

                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="questionListEditShow(1,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteQuestionListOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>
              </el-tabs>
              <!-------------------------------品管特急分解----------------------------------->
              <el-tabs v-model="activeNameUrgentTeardown" @tab-click="handleClickUrgentTeardown" v-if="selectTree===6">
                <!--特急分解检测标准-->
                <el-tab-pane :label="main.urgentTeardownStandard" name="urgentTeardownStandard">
                  <div style="text-align: right;margin-bottom: 5px;margin-top: -0.5px;" >
                    <el-button type="success" size="small" style="margin-right: 5px" @click="sendToMeasureShow(1,null)">{{pageVal.urgentTeardown.sendToMeasure}}</el-button>
                    <el-button size="small" @click="urgentTeardownStandardEditShow(1, null)" v-if="usePower===111">
                      <i class="el-icon-plus"></i>
                    </el-button>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="urgentTeardownStandardData"
                        style="width: 100%"
                        :height="measuringToolsListHeight"
                        border
                        highlight-current-row>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 机型 -->
                      <el-table-column
                          prop="engine_model"
                          :label="pageVal.urgentTeardown.engine_model"
                          align="center">
                      </el-table-column>
                      <!-- 零部件图号 -->
                      <el-table-column
                          prop="part_number"
                          :label="pageVal.urgentTeardown.part_number"
                          align="center">
                      </el-table-column>
                      <!-- 零部件名称 -->
                      <el-table-column
                          prop="part_name"
                          :label="pageVal.urgentTeardown.part_name"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.part_name}}</span>
                      </el-table-column>
                      <!-- 检测项目 -->
                      <el-table-column
                          prop="measurement_project"
                          :label="pageVal.urgentTeardown.measurement_project"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.measurement_project}}</span>
                      </el-table-column>
                      <!-- 类别 -->
                      <el-table-column
                          prop="category"
                          :label="pageVal.urgentTeardown.category"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[2]}}</span>
                        <span v-else>{{scope.row.category}}</span>
                      </el-table-column>
                      <!-- 标准值 -->
                      <el-table-column
                          prop="standard_value"
                          :label="pageVal.fixtureTechnicalCondition.standard_value"
                          align="center">
                      </el-table-column>
                      <!-- 上公差 -->
                      <el-table-column
                          prop="upper_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
                          align="center">
                      </el-table-column>
                      <!-- 下公差 -->
                      <el-table-column
                          prop="lower_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
                          align="center">
                      </el-table-column>
                      <!-- 标准建立人 -->
                      <el-table-column
                          prop="standard_setter"
                          :label="pageVal.urgentTeardown.standard_setter"
                          align="center">
                      </el-table-column>
                      <!-- 批准人 -->
                      <el-table-column
                          prop="approver"
                          :label="pageVal.urgentTeardown.approver"
                          align="center">
                      </el-table-column>
                      <!-- 检测地点 -->
                      <el-table-column
                          prop="measurement_place"
                          :label="pageVal.urgentTeardown.measurement_place"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[2]}}</span>
                        <span v-else>{{scope.row.measurement_place}}</span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="urgentTeardownStandardEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link @click="deleteDataShow('deleteUrgentTeardownStandardOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChangeUrgentTeardownStandard"
                        @current-change="handleCurrentChangeUrgentTeardownStandard"
                        :current-page="urgentTeardownStandardPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="urgentTeardownStandardPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="urgentTeardownStandardPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>
                <!--特急分解检测结果-->
                <el-tab-pane :label="main.urgentTeardownResult" name="urgentTeardownResult">
                  <div style="text-align: right;overflow-x: auto">
                    <el-form :inline="true" @submit.prevent>
                      <!--特急分解编号-->
                      <el-form-item :label="pageVal.urgentTeardown.urgent_teardown_number">
                        <el-input v-model="urgent_teardown_number" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <!--是否完成-->
                      <el-form-item :label="pageVal.urgentTeardown.finish">
                        <el-select v-model="finish" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option label="Yes" value="Yes"></el-option>
                          <el-option label="No" value="No"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-button type="primary" size="small" @click="handleFilterUrgentTeardownResult" style="margin-top: 8px">
                        <i class="el-icon-search"></i>
                      </el-button>
                      <el-button size="small" @click="resetFilterUrgentTeardownResult">
                        <i class="el-icon-refresh"></i>
                      </el-button>
                      <el-button size="small" @click="uploadUrgentTeardownResultShow">
                        {{pageVal.urgentTeardown.upload}}
                      </el-button>
                      <el-button type="success" size="small" @click="finishUrgentTeardownResultShow">
                        {{pageVal.urgentTeardown.finished}}
                      </el-button>
                    </el-form>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="filteredUrgentTeardownResultData"
                        style="width: 100%"
                        :height="measuringToolsListHeight"
                        border
                        highlight-current-row>

                      <el-table-column type="expand" width="40">
                        <template slot-scope="props">
                          <el-table
                              :data="[props.row]"
                              border
                              style="width: 100%; margin-bottom: 10px">
                            <!-- 机型 -->
                            <el-table-column
                                prop="engine_model"
                                :label="pageVal.urgentTeardown.engine_model"
                                align="center">
                            </el-table-column>
                            <!-- 零部件图号 -->
                            <el-table-column
                                prop="part_number"
                                :label="pageVal.urgentTeardown.part_number"
                                width="120px"
                                align="center">
                            </el-table-column>
                            <!-- 零部件名称 -->
                            <el-table-column
                                prop="part_name"
                                :label="pageVal.urgentTeardown.part_name"
                                width="120px"
                                align="center"
                                v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[0]}}</span>
                              <span v-else-if="languageS==='english' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[1]}}</span>
                              <span v-else-if="languageS==='russian' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[2]}}</span>
                              <span v-else>{{scope.row.part_name}}</span>
                            </el-table-column>
                            <!-- 检测项目 -->
                            <el-table-column
                                prop="measurement_project"
                                :label="pageVal.urgentTeardown.measurement_project"
                                align="center"
                                v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
                              <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
                              <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
                              <span v-else>{{scope.row.measurement_project}}</span>
                            </el-table-column>
                            <!-- 标准值 -->
                            <el-table-column
                                prop="standard_value"
                                :label="pageVal.fixtureTechnicalCondition.standard_value"
                                align="center">
                            </el-table-column>
                            <!-- 上公差 -->
                            <el-table-column
                                prop="upper_tolerance"
                                :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
                                align="center">
                            </el-table-column>
                            <!-- 下公差 -->
                            <el-table-column
                                prop="lower_tolerance"
                                :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
                                align="center">
                            </el-table-column>
                            <!-- 标准建立人 -->
                            <el-table-column
                                prop="standard_setter"
                                :label="pageVal.urgentTeardown.standard_setter"
                                align="center">
                            </el-table-column>
                            <!-- 批准人 -->
                            <el-table-column
                                prop="approver"
                                :label="pageVal.urgentTeardown.approver"
                                align="center">
                            </el-table-column>
                            <!-- 检测地点 -->
                            <el-table-column
                                prop="measurement_place"
                                :label="pageVal.urgentTeardown.measurement_place"
                                align="center"
                                v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[0]}}</span>
                              <span v-else-if="languageS==='english' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[1]}}</span>
                              <span v-else-if="languageS==='russian' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[2]}}</span>
                              <span v-else>{{scope.row.measurement_place}}</span>
                            </el-table-column>
                          </el-table>
                        </template>
                      </el-table-column>
                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 特急分解编号 -->
                      <el-table-column
                          prop="urgent_teardown_number"
                          :label="pageVal.urgentTeardown.urgent_teardown_number"
                          width="110px"
                          align="center">
                      </el-table-column>
                      <!-- 送检人 -->
                      <el-table-column
                          prop="send_measurement_person"
                          :label="pageVal.urgentTeardown.send_measurement_person"
                          align="center">
                      </el-table-column>
                      <!-- 发动机号 -->
                      <el-table-column
                          prop="engine_number"
                          :label="pageVal.urgentTeardown.engine_number"
                          align="center">
                      </el-table-column>
                      <!-- 类别 -->
                      <el-table-column
                          prop="category"
                          :label="pageVal.urgentTeardown.category"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[2]}}</span>
                        <span v-else>{{scope.row.category}}</span>
                      </el-table-column>
                      <!-- 实测值 -->
                      <el-table-column
                          prop="actual_value"
                          :label="pageVal.urgentTeardown.actual_value"
                          align="center">
                      </el-table-column>
                      <!-- 检测/拍照人 -->
                      <el-table-column
                          prop="measuring_picture_person"
                          :label="pageVal.urgentTeardown.measuring_picture_person"
                          align="center">
                      </el-table-column>
                      <!-- 检测日期 -->
                      <el-table-column
                          prop="measurement_date"
                          :label="pageVal.urgentTeardown.measurement_date"
                          align="center">
                      </el-table-column>
                      <!-- 特急分解名称 -->
                      <el-table-column
                          prop="urgent_teardown_name"
                          :label="pageVal.urgentTeardown.urgent_teardown_name"
                          align="center"
                          v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.urgent_teardown_name!==undefined && scope.row.urgent_teardown_name.split('/').length===3">
                        {{scope.row.urgent_teardown_name.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.urgent_teardown_name!==undefined && scope.row.urgent_teardown_name.split('/').length===3">
                        {{scope.row.urgent_teardown_name.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.urgent_teardown_name!==undefined && scope.row.urgent_teardown_name.split('/').length===3">
                        {{scope.row.urgent_teardown_name.split('/')[2]}}</span>
                        <span v-else>{{scope.row.urgent_teardown_name}}</span>
                      </el-table-column>
                      <!-- 备注 -->
                      <el-table-column
                          prop="notes"
                          :label="pageVal.urgentTeardown.notes"
                          align="center"
                          v-slot:default="scope"
                          :show-overflow-tooltip="true">
                      <span v-if="languageS==='chinese' && scope.row.notes!==undefined && scope.row.notes.split('|*|').length===3">
                        {{scope.row.notes.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.notes!==undefined && scope.row.notes.split('|*|').length===3">
                        {{scope.row.notes.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.notes!==undefined && scope.row.notes.split('|*|').length===3">
                        {{scope.row.notes.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.notes}}</span>
                      </el-table-column>
                      <!-- 是否完成 -->
                      <el-table-column
                          prop="finish"
                          :label="pageVal.urgentTeardown.finish"
                          align="center">
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="urgentTeardownResultEditShow(1,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChangeUrgentTeardownResult"
                        @current-change="handleCurrentChangeUrgentTeardownResult"
                        :current-page="urgentTeardownResultPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="urgentTeardownResultPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="urgentTeardownResultPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>
              </el-tabs>

              <!-------------------------------------产技工装--------------------------------------------->
              <el-tabs v-model="activeNameFixture1" @tab-click="handleClickProductFixture" v-if="selectTree===1">
                <!--工装技术条件-->
                <el-tab-pane :label="main.fixtureTechnicalCondition" name="fixtureTechnicalCondition">
                  <!--新增按钮-->
                  <div style="text-align: right;margin-bottom: 5px" >
                    <el-link size="small" @click="fixtureTechnicalConditionEditShow(1,null)"><i class="el-icon-circle-plus-outline" v-if="usePower===111"></i></el-link>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="fixtureTechnicalConditionData"
                        style="width: 100%"
                        :height="fixtureTechnicalConditionHeight"
                        border
                        highlight-current-row
                        v-loading="fixtureLoading"
                        element-loading-text="数据加载中..."
                        element-loading-spinner="el-icon-loading">

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{(fixtureTechnicalConditionPagination.currentPage-1)*fixtureTechnicalConditionPagination.pageSize+scope.$index+1}}
                      </el-table-column>
                      <!-- 设备名称 -->
                      <el-table-column
                          :prop="equipment_name"
                          :label="pageVal.fixtureTechnicalCondition.equipment_name"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 设备型号 -->
                      <el-table-column
                          prop="equipment_model"
                          :label="pageVal.fixtureTechnicalCondition.equipment_model"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 类别 -->
                      <el-table-column
                          :prop="category"
                          :label="pageVal.fixtureTechnicalCondition.category"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 工装名称 -->
                      <el-table-column
                          :prop="fixture_name"
                          :label="pageVal.fixtureTechnicalCondition.fixture_name"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 工装图纸编号 -->
                      <el-table-column
                          prop="drawing_number"
                          :label="pageVal.fixtureTechnicalCondition.drawing_number"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 应用机型 -->
                      <el-table-column
                          prop="engine_model"
                          :label="pageVal.fixtureTechnicalCondition.engine_model"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 控制项目 -->
                      <el-table-column
                          :prop="control_project"
                          :label="pageVal.fixtureTechnicalCondition.control_project"
                          width="125"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>
                      <!-- 评价/测量技术 -->
                      <el-table-column
                          :prop="measurement_technique"
                          :label="pageVal.fixtureTechnicalCondition.measurement_technique"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 容量 -->
                      <el-table-column
                          prop="capacity"
                          :label="pageVal.fixtureTechnicalCondition.capacity"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[2]}}</span>
                        <span v-else>{{scope.row.capacity}}</span>
                      </el-table-column>
                      <!-- 频次 -->
                      <el-table-column
                          prop="frequency"
                          :label="pageVal.fixtureTechnicalCondition.frequency"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[2]}}</span>
                        <span v-else>{{scope.row.frequency}}</span>
                      </el-table-column>
                      <!-- 控制方法 -->
                      <el-table-column
                          :prop="control_method"
                          :label="pageVal.fixtureTechnicalCondition.control_method"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 失效模式 -->
                      <el-table-column
                          :prop="failure_mode"
                          :label="pageVal.fixtureTechnicalCondition.failure_mode"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 责任部门 -->
                      <el-table-column
                          prop="department"
                          :label="pageVal.fixtureTechnicalCondition.department"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[2]}}</span>
                        <span v-else>{{scope.row.department}}</span>
                      </el-table-column>
                      <!-- 工装来源 -->
                      <el-table-column
                          prop="source"
                          :label="pageVal.fixtureTechnicalCondition.source"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[2]}}</span>
                        <span v-else>{{scope.row.source}}</span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="fixtureTechnicalConditionEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link @click="deleteDataShow('deleteFixtureTechnicalConditionOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="fixtureTechnicalConditionPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="fixtureTechnicalConditionPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="fixtureTechnicalConditionPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>

                <!--工装台账-->
                <el-tab-pane :label="main.fixtureList" name="fixtureList">
                  <!--新增按钮-->
                  <div style="text-align: right;margin-bottom: 5px" >
                    <el-link size="small" @click="fixtureListEditShow(1,null)"><i class="el-icon-circle-plus-outline" v-if="usePower===111"></i></el-link>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="fixtureListData"
                        style="width: 100%"
                        :height="fixtureListHeight"
                        border
                        highlight-current-row>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 车间 -->
                      <el-table-column
                          prop="workshop"
                          :label="pageVal.fixtureList.workshop"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[2]}}</span>
                        <span v-else>{{scope.row.workshop}}</span>
                      </el-table-column>
                      <!-- 责任部门 -->
                      <el-table-column
                          prop="department"
                          :label="pageVal.fixtureList.department"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[2]}}</span>
                        <span v-else>{{scope.row.department}}</span>
                      </el-table-column>
                      <!-- 机床名称 -->
                      <el-table-column
                          prop="equipment_name"
                          :label="pageVal.fixtureList.equipment_name"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.equipment_name!==undefined && scope.row.equipment_name.split('|*|').length===3">
                        {{scope.row.equipment_name.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.equipment_name!==undefined && scope.row.equipment_name.split('|*|').length===3">
                        {{scope.row.equipment_name.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.equipment_name!==undefined && scope.row.equipment_name.split('|*|').length===3">
                        {{scope.row.equipment_name.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.equipment_name}}</span>
                      </el-table-column>
                      <!-- 线体 -->
                      <el-table-column
                          prop="line"
                          :label="pageVal.fixtureTechnicalCondition.line"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[2]}}</span>
                        <span v-else>{{scope.row.line}}</span>
                      </el-table-column>
                      <!-- 工序/存放地点 -->
                      <el-table-column
                          prop="op"
                          :label="pageVal.fixtureTechnicalCondition.op"
                          width="100"
                          align="center">
                      </el-table-column>
                      <!-- 检查项目 -->
                      <el-table-column
                          prop="measurement_project"
                          :label="pageVal.fixtureList.measurement_project"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.measurement_project}}</span>
                      </el-table-column>
                      <!-- 工装图纸编号 -->
                      <el-table-column
                          prop="drawing_number"
                          :label="pageVal.fixtureTechnicalCondition.drawing_number"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 检查标准 -->
                      <el-table-column
                          prop="measurement_standard"
                          :label="pageVal.fixtureList.measurement_standard"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                        {{scope.row.measurement_standard.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                        {{scope.row.measurement_standard.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                        {{scope.row.measurement_standard.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.measurement_standard}}</span>
                      </el-table-column>
                      <!-- 测量类型 -->
                      <el-table-column
                          prop="measurement_type"
                          :label="pageVal.fixtureTechnicalCondition.measurement_type"
                          width="100"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.measurement_type!==undefined && scope.row.measurement_type.split('/').length===3">
                        {{scope.row.measurement_type.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_type!==undefined && scope.row.measurement_type.split('/').length===3">
                        {{scope.row.measurement_type.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_type!==undefined && scope.row.measurement_type.split('/').length===3">
                        {{scope.row.measurement_type.split('/')[2]}}</span>
                        <span v-else>{{scope.row.measurement_type}}</span>
                      </el-table-column>
                      <!-- 标准值 -->
                      <el-table-column
                          prop="standard_value"
                          :label="pageVal.fixtureTechnicalCondition.standard_value"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 上公差 -->
                      <el-table-column
                          prop="upper_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 下公差 -->
                      <el-table-column
                          prop="lower_tolerance"
                          :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 机型 -->
                      <el-table-column
                          prop="model"
                          :label="pageVal.urgentTeardown.engine_model"
                          width="100"
                          align="center">
                      </el-table-column>
                      <!-- 评价/测量技术 -->
                      <el-table-column
                          prop="measurement_technique"
                          :label="pageVal.fixtureTechnicalCondition.measurement_technique"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                        {{scope.row.measurement_technique.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                        {{scope.row.measurement_technique.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                        {{scope.row.measurement_technique.split('|*|')[2]}}</span>
                        <span v-else>{{scope.row.measurement_technique}}</span>
                      </el-table-column>
                      <!-- 周期 -->
                      <el-table-column
                          prop="cycle"
                          :label="pageVal.fixtureList.cycle"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                        {{scope.row.cycle.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                        {{scope.row.cycle.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                        {{scope.row.cycle.split('/')[2]}}</span>
                        <span v-else>{{scope.row.cycle}}</span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          width="100px"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="fixtureListEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteFixtureListOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                        <el-link @click="qrCodeShow(scope.row)">
                          <i class="el-icon-s-grid"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>

                <!--工装点检管理-->
                <el-tab-pane :label="main.fixtureInspectionManagement" name="fixtureInspectionManagement">
                  <div style="border: 1px solid #ccc; padding: 20px; height: calc(75vh - 83px); ">
                    <div style="display: flex; align-items: center; gap: 10px;">
                        <!-- 点检人 -->
                        <span>点检人：</span>
                        <el-input
                            ref="checkPerson"
                            v-model="checkPerson"
                            clearable
                            style="flex: 1;">
                        </el-input>
                        <!-- 更改日期 -->
                        <span>点检日期：</span>
                        <el-date-picker
                            v-model="selectedDateTime"
                            type="datetime"
                            placeholder="选择日期时间"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            :default-time="defaultTime"
                            @change="confirmDateTime"
                            style="width: 200px"/>
                        <!-- 保存点检结果 -->
                        <el-button type="primary" @click="saveFixtureCheckResultProduct">
                          {{ pageVal.saveResult }}
                        </el-button>
                      </div>
                    <el-table
                            :data="fixtureChecklistData"
                            style="width: 80vw; margin-top: 12px"
                            :height="fixtureInspectionManagementHeight"
                            border
                            highlight-current-row>
                          <!-- 序号 -->
                          <el-table-column
                              :label="pageVal.measuringToolChecklist.order"
                              width="50"
                              align="center"
                              v-slot:default="scope">
                            {{scope.$index+1}}
                          </el-table-column>
                          <!-- 工装图纸编号 -->
                          <el-table-column
                              :label="pageVal.fixtureTechnicalCondition.drawing_number"
                              width="100"
                              align="center"
                              v-slot:default="scope">
                            <span>{{scope.row.drawing_number}}</span>
                          </el-table-column>
                          <!-- 检查项目 -->
                          <el-table-column
                              :label="pageVal.fixtureList.measurement_project"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                              {{scope.row.measurement_project.split('|*|')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                              {{scope.row.measurement_project.split('|*|')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                              {{scope.row.measurement_project.split('|*|')[2]}}</span>
                            <span v-else>{{scope.row.measurement_project}}</span>
                          </el-table-column>
                          <!-- 检查标准 -->
                          <el-table-column
                              :label="pageVal.fixtureList.measurement_standard"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                              {{scope.row.measurement_standard.split('|*|')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                              {{scope.row.measurement_standard.split('|*|')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.measurement_standard!==undefined && scope.row.measurement_standard.split('|*|').length===3">
                              {{scope.row.measurement_standard.split('|*|')[2]}}</span>
                            <span v-else>{{scope.row.measurement_standard}}</span>
                          </el-table-column>
                          <!-- 评价/测量技术 -->
                          <el-table-column
                              :label="pageVal.fixtureTechnicalCondition.measurement_technique"
                              width="100"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                              {{scope.row.measurement_technique.split('|*|')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                              {{scope.row.measurement_technique.split('|*|')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.measurement_technique!==undefined && scope.row.measurement_technique.split('|*|').length===3">
                              {{scope.row.measurement_technique.split('|*|')[2]}}</span>
                            <span v-else>{{scope.row.measurement_technique}}</span>
                          </el-table-column>
                          <!-- 周期 -->
                          <el-table-column
                              :label="pageVal.fixtureList.cycle"
                              width="100"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                              {{scope.row.cycle.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                              {{scope.row.cycle.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.cycle!==undefined && scope.row.cycle.split('/').length===3">
                              {{scope.row.cycle.split('/')[2]}}</span>
                            <span v-else>{{scope.row.cycle}}</span>
                          </el-table-column>
                          <!-- 点检结果 -->
                          <el-table-column
                              :label="pageVal.fixtureCheckInformation.check_result"
                              width="100"
                              align="center">
                            <template #default="scope">
                              <el-radio-group v-model="scope.row.check_result" style="text-align: left">
                                <el-radio label="YES" style="margin-bottom: 10px">YES</el-radio>
                                <el-radio label="NO" style="margin-bottom: 10px">NO</el-radio>
                              </el-radio-group>
                              <el-button
                                  size="mini"
                                  @click="scope.row.check_result = ''">
                                {{pageVal.cancel}}
                              </el-button>
                            </template>
                          </el-table-column>
                          <!-- 点检值 -->
                          <el-table-column
                              :label="pageVal.fixtureCheckInformation.check_value"
                              width="100"
                              align="center"
                              v-slot:default="scope">
                            <el-input
                                v-model="scope.row.check_value"
                                v-if="scope.row.measurement_type==='计量/Record values/Запись числовое значение'">
                            </el-input>
                          </el-table-column>
                          <!-- 异常描述 -->
                          <el-table-column
                              :label="pageVal.measuringToolChecklist.abnormal_description"
                              width="150"
                              align="center"
                              v-slot:default="scope">
                            <el-input
                                v-model="scope.row.abnormal_description"
                                type="textarea"
                                :rows="3"
                                :placeholder="pageVal.inputAbnormalDescription"
                                v-if="scope.row.check_result==='NO'">
                            </el-input>
                          </el-table-column>
                        </el-table>
                  </div>
                </el-tab-pane>

              </el-tabs>

              <!-------------------------------------装配工装--------------------------------------------->
              <el-tabs v-model="activeNameFixture" @tab-click="handleClickAssemblyFixture" v-if="selectTree===2">
                <!--工装技术条件-->
                <el-tab-pane :label="main.fixtureTechnicalCondition" name="fixtureTechnicalCondition">
                  <!--新增按钮-->
                  <div style="text-align: right;margin-bottom: 5px" >
                    <el-link size="small" @click="fixtureTechnicalConditionEditShow(1,null)"><i class="el-icon-circle-plus-outline" v-if="usePower===111"></i></el-link>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="fixtureTechnicalConditionData"
                        style="width: 100%"
                        :height="fixtureTechnicalConditionHeight"
                        border
                        highlight-current-row
                        v-loading="fixtureLoading"
                        element-loading-text="数据加载中..."
                        element-loading-spinner="el-icon-loading">

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolsList.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{(fixtureTechnicalConditionPagination.currentPage-1)*fixtureTechnicalConditionPagination.pageSize+scope.$index+1}}
                      </el-table-column>
                      <!-- 设备名称 -->
                      <el-table-column
                          :prop="equipment_name"
                          :label="pageVal.fixtureTechnicalCondition.equipment_name"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 设备型号 -->
                      <el-table-column
                          prop="equipment_model"
                          :label="pageVal.fixtureTechnicalCondition.equipment_model"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 类别 -->
                      <el-table-column
                          :prop="category"
                          :label="pageVal.fixtureTechnicalCondition.category"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 工装名称 -->
                      <el-table-column
                          :prop="fixture_name"
                          :label="pageVal.fixtureTechnicalCondition.fixture_name"
                          width="160"
                          align="center">
                      </el-table-column>
                      <!-- 工装图纸编号 -->
                      <el-table-column
                          prop="drawing_number"
                          :label="pageVal.fixtureTechnicalCondition.drawing_number"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 应用机型 -->
                      <el-table-column
                          prop="engine_model"
                          :label="pageVal.fixtureTechnicalCondition.engine_model"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 控制项目 -->
                      <el-table-column
                          :prop="control_project"
                          :label="pageVal.fixtureTechnicalCondition.control_project"
                          width="125"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>
                      <!-- 评价/测量技术 -->
                      <el-table-column
                          :prop="measurement_technique"
                          :label="pageVal.fixtureTechnicalCondition.measurement_technique"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 容量 -->
                      <el-table-column
                          prop="capacity"
                          :label="pageVal.fixtureTechnicalCondition.capacity"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.capacity!==undefined && scope.row.capacity.split('/').length===3">
                        {{scope.row.capacity.split('/')[2]}}</span>
                        <span v-else>{{scope.row.capacity}}</span>
                      </el-table-column>
                      <!-- 频次 -->
                      <el-table-column
                          prop="frequency"
                          :label="pageVal.fixtureTechnicalCondition.frequency"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.frequency!==undefined && scope.row.frequency.split('/').length===3">
                        {{scope.row.frequency.split('/')[2]}}</span>
                        <span v-else>{{scope.row.frequency}}</span>
                      </el-table-column>
                      <!-- 控制方法 -->
                      <el-table-column
                          :prop="control_method"
                          :label="pageVal.fixtureTechnicalCondition.control_method"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 失效模式 -->
                      <el-table-column
                          :prop="failure_mode"
                          :label="pageVal.fixtureTechnicalCondition.failure_mode"
                          width="125"
                          align="center">
                      </el-table-column>
                      <!-- 责任部门 -->
                      <el-table-column
                          prop="department"
                          :label="pageVal.fixtureTechnicalCondition.department"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[2]}}</span>
                        <span v-else>{{scope.row.department}}</span>
                      </el-table-column>
                      <!-- 工装来源 -->
                      <el-table-column
                          prop="source"
                          :label="pageVal.fixtureTechnicalCondition.source"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian' && scope.row.source!==undefined && scope.row.source.split('/').length===3">
                        {{scope.row.source.split('/')[2]}}</span>
                        <span v-else>{{scope.row.source}}</span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="fixtureTechnicalConditionEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link @click="deleteDataShow('deleteFixtureTechnicalConditionOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="fixtureTechnicalConditionPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="fixtureTechnicalConditionPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="fixtureTechnicalConditionPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>

                <!--工装点检台账-->
                <el-tab-pane :label="main.fixtureList" name="fixtureList">
                  <good-product-conditions-fixture-list
                      :active-tab="activeNameFixture"
                      ref="fixtureListRef"></good-product-conditions-fixture-list>
                </el-tab-pane>

                <!--工装点检管理-->
                <el-tab-pane :label="main.fixtureInspectionManagement" name="fixtureInspectionManagement">
                  <good-product-conditions-fixture-inspection
                      :active-tab="activeNameFixture"
                      ref="fixtureInspectionRef">
                  </good-product-conditions-fixture-inspection>
                </el-tab-pane>
              </el-tabs>
              <!-------------------------------------装配微小缺陷--------------------------------------------->
              <el-tabs v-model="activeNameAssemblyMinor" @tab-click="handleClickAssemblyMinor" v-if="selectTree===5">
                <!--微小缺陷记录-->
                <el-tab-pane :label="main.minorDefectRecord" name="minorDefectRecord">
                  <div style="text-align: left;overflow-x: auto">
                    <el-form :inline="true" @submit.prevent>
                      <!--日期-->
                      <el-form-item :label="pageVal.minorDefectRecord.date">
                        <el-date-picker
                            v-model="date"
                            type="date"
                            :placeholder="pageVal.selectDate"
                            value-format="yyyy-MM-dd"
                            format="yyyy-MM-dd"
                            style="width: 160px" size="mini">
                        </el-date-picker>
                      </el-form-item>
                      <!--线体-->
                      <el-form-item :label="pageVal.fixtureTechnicalCondition.line">
                        <el-select v-model="line" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option label="总成线/Assembly line/сборочная линия" value="总成线/Assembly line/сборочная линия"></el-option>
                          <el-option label="缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров" value="缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров"></el-option>
                          <el-option label="热试线/Hot test line/Тепловая линия" value="热试线/Hot test line/Тепловая линия"></el-option>
                          <el-option label="其他/Other/Другие" value="其他/Other/Другие"></el-option>
                        </el-select>
                      </el-form-item>
                      <!--工序-->
                      <el-form-item :label="pageVal.oilChecklist.op">
                        <el-input v-model="op" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <!--责任人-->
                      <el-form-item :label="pageVal.minorDefectRecord.responsible_person">
                        <el-input v-model="responsible_person" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <el-button type="primary" size="mini" @click="handleFilterMinorDefectRecord" style="margin-top: 8px">
                        <i class="el-icon-search"></i>
                      </el-button>
                      <el-button size="mini" @click="resetFilterMinorDefectRecord">
                        <i class="el-icon-refresh"></i>
                      </el-button>
                      <el-button type="success" size="mini" @click="minorDefectRecordEditShow(1, null)">
                        <i class="el-icon-plus"></i>
                      </el-button>
                    </el-form>
                  </div>
                  <div style="margin-top: -5px" :key="componentKey">
                    <el-table
                        :data="filteredMinorDefectRecordData"
                        style="width: 100%"
                        border
                        :height="minorDefectRecordHeight">
                      <!-- 展开行列 -->
                      <el-table-column type="expand" width="40">
                        <template slot-scope="props">
                          <!-- 第一行：对策内容和完成日期 -->
                          <el-table
                              :data="[props.row]"
                              border
                              style="width: 100%; margin-bottom: 10px">
                            <!-- 对策内容 -->
                            <el-table-column
                                prop="countermeasure_content"
                                :label="pageVal.minorDefectRecord.countermeasure_content"
                                header-align="center"
                                align="left"
                                v-slot:default="scope">
                              <span v-if="languageS==='chinese'" v-html="scope.row.countermeasure_content.split('|*|')[0]"></span>
                              <span v-else-if="languageS==='english'" v-html="scope.row.countermeasure_content.split('|*|')[1]"></span>
                              <span v-else-if="languageS==='russian'" v-html="scope.row.countermeasure_content.split('|*|')[2]"></span>
                              <span v-else>{{scope.row.countermeasure_content}}</span>
                            </el-table-column>
                            <!-- 完成日期 -->
                            <el-table-column
                                prop="completion_date"
                                :label="pageVal.minorDefectRecord.completion_date"
                                align="center"
                                width="120px">
                            </el-table-column>
                            <!-- 编辑按钮 -->
                            <el-table-column
                                :label="main.edit"
                                width="100"
                                align="center"
                                v-slot:default="scope">
                              <el-link @click="editCountermeasureContent(3,scope)">
                                <i class="el-icon-edit"></i>
                              </el-link>
                            </el-table-column>
                          </el-table>

                          <!-- 第二行：对策有效性、确认人、是否结题 -->
                          <el-table
                              :data="[props.row]"
                              border
                              style="width: 100%">
                            <!-- 对策有效性 -->
                            <el-table-column
                                prop="countermeasure_effectiveness"
                                :label="pageVal.minorDefectRecord.countermeasure_effectiveness"
                                align="center"
                                v-slot:default="scope">
                                <span v-if="languageS==='chinese' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[0]}}</span>
                              <span v-else-if="languageS==='english' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[1]}}</span>
                              <span v-else-if="languageS==='russian' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[2]}}</span>
                              <span v-else>{{scope.row.countermeasure_effectiveness}}</span>
                            </el-table-column>
                            <!-- 确认人 -->
                            <el-table-column
                                prop="confirmed_by"
                                :label="pageVal.minorDefectRecord.confirmed_by"
                                align="center">
                            </el-table-column>
                            <!-- 结题 -->
                            <el-table-column
                                prop="closing"
                                :label="pageVal.minorDefectRecord.closing"
                                align="center">
                            </el-table-column>
                            <!-- 编辑按钮 -->
                            <el-table-column
                                :label="main.edit"
                                width="100"
                                align="center"
                                v-slot:default="scope">
                              <el-link @click="editCountermeasureEffectiveness(4,scope)">
                                <i class="el-icon-edit"></i>
                              </el-link>
                            </el-table-column>
                          </el-table>
                        </template>
                      </el-table-column>
                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 班组 -->
                      <el-table-column
                          prop="team"
                          :label="pageVal.minorDefectRecord.team"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 提出人 -->
                      <el-table-column
                          prop="raised_by"
                          :label="pageVal.minorDefectRecord.raised_by"
                          align="center">
                      </el-table-column>
                      <!-- 日期 -->
                      <el-table-column
                          prop="date"
                          :label="pageVal.minorDefectRecord.date"
                          width="105"
                          align="center">
                      </el-table-column>
                      <!-- 车间 -->
                      <el-table-column
                          prop="workshop"
                          :label="pageVal.oilChecklist.workshop"
                          width="100"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.workshop}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.workshop.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.workshop.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.workshop.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 线体 -->
                      <el-table-column
                          prop="line"
                          :label="pageVal.fixtureTechnicalCondition.line"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 工序 -->
                      <el-table-column
                          prop="op"
                          :label="pageVal.oilChecklist.op"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 缺陷描述 -->
                      <el-table-column
                          prop="defect_description"
                          :label="pageVal.minorDefectRecord.defect_description"
                          width="160"
                          header-align="center"
                          :show-overflow-tooltip="true"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.defect_description}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.defect_description.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.defect_description.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.defect_description.split('|*|')[2]}}</span>
                      </el-table-column>
                      <!-- 责任人 -->
                      <el-table-column
                          prop="responsible_person"
                          :label="pageVal.minorDefectRecord.responsible_person"
                          align="center">
                      </el-table-column>
                      <!-- 是否汇报 -->
                      <el-table-column
                          prop="reporting"
                          :label="pageVal.minorDefectRecord.reporting"
                          align="center">
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          width="100"
                          v-slot:default="scope">
                        <el-link style="margin-right: 8px" @click="minorDefectRecordEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteMinorDefectRecordOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChangeMinorDefectRecord"
                        @current-change="handleCurrentChangeMinorDefectRecord"
                        :current-page="minorDefectRecordPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="minorDefectRecordPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="minorDefectRecordPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>
              </el-tabs>

              <!---------------------------------------机加微小缺陷------------------------------------------->
              <el-tabs v-model="activeNameMachiningMinor" @tab-click="handleClickMachiningMinor" v-if="selectTree===3">
                <!--微小缺陷记录-->
                <el-tab-pane :label="main.minorDefectRecord" name="minorDefectRecord">
                  <div style="text-align: left;overflow-x: auto">
                    <el-form :inline="true" @submit.prevent>
                      <!--日期-->
                      <el-form-item :label="pageVal.minorDefectRecord.date">
                        <el-date-picker
                            v-model="date"
                            type="date"
                            :placeholder="pageVal.selectDate"
                            value-format="yyyy-MM-dd"
                            format="yyyy-MM-dd"
                            style="width: 160px" size="mini">
                        </el-date-picker>
                      </el-form-item>
                      <!--线体-->
                      <el-form-item :label="pageVal.fixtureTechnicalCondition.line">
                        <el-select v-model="line" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option label="缸体线/Cylinder block line/линия блока цилиндров" value="缸体线/Cylinder block line/линия блока цилиндров"></el-option>
                          <el-option label="缸盖线/Cylinder head line/линия головки блока цилиндров" value="缸盖线/Cylinder head line/линия головки блока цилиндров"></el-option>
                          <el-option label="其他/Other/Другие" value="其他/Other/Другие"></el-option>
                        </el-select>
                      </el-form-item>
                      <!--工序-->
                      <el-form-item :label="pageVal.oilChecklist.op">
                        <el-input v-model="op" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <!--责任人-->
                      <el-form-item :label="pageVal.minorDefectRecord.responsible_person">
                        <el-input v-model="responsible_person" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <el-button type="primary" size="mini" @click="handleFilterMinorDefectRecord" style="margin-top: 8px">
                        <i class="el-icon-search"></i>
                      </el-button>
                      <el-button size="mini" @click="resetFilterMinorDefectRecord">
                        <i class="el-icon-refresh"></i>
                      </el-button>
                      <el-button type="success" size="mini" @click="minorDefectRecordEditShow(1, null)">
                        <i class="el-icon-plus"></i>
                      </el-button>
                    </el-form>
                  </div>
                  <div style="margin-top: -5px" :key="componentKey">
                    <el-table
                        :data="filteredMinorDefectRecordData"
                        style="width: 100%"
                        border
                        :height="minorDefectRecordHeight">
                      <!-- 展开行列 -->
                      <el-table-column type="expand" width="40">
                        <template slot-scope="props">
                          <!-- 第一行：对策内容和完成日期 -->
                          <el-table
                              :data="[props.row]"
                              border
                              style="width: 100%; margin-bottom: 10px">
                            <!-- 对策内容 -->
                            <el-table-column
                                prop="countermeasure_content"
                                :label="pageVal.minorDefectRecord.countermeasure_content"
                                header-align="center"
                                align="left"
                                v-slot:default="scope">
                              <span v-if="languageS==='chinese'" v-html="scope.row.countermeasure_content.split('|*|')[0]"></span>
                              <span v-else-if="languageS==='english'" v-html="scope.row.countermeasure_content.split('|*|')[1]"></span>
                              <span v-else-if="languageS==='russian'" v-html="scope.row.countermeasure_content.split('|*|')[2]"></span>
                              <span v-else>{{scope.row.countermeasure_content}}</span>
                            </el-table-column>
                            <!-- 完成日期 -->
                            <el-table-column
                                prop="completion_date"
                                :label="pageVal.minorDefectRecord.completion_date"
                                align="center"
                                width="120px">
                            </el-table-column>
                            <!-- 编辑按钮 -->
                            <el-table-column
                                :label="main.edit"
                                width="100"
                                align="center"
                                v-slot:default="scope">
                              <el-link @click="editCountermeasureContent(3,scope)">
                                <i class="el-icon-edit"></i>
                              </el-link>
                            </el-table-column>
                          </el-table>

                          <!-- 第二行：对策有效性、确认人、是否结题 -->
                          <el-table
                              :data="[props.row]"
                              border
                              style="width: 100%">
                            <!-- 对策有效性 -->
                            <el-table-column
                                prop="countermeasure_effectiveness"
                                :label="pageVal.minorDefectRecord.countermeasure_effectiveness"
                                align="center"
                                v-slot:default="scope">
                                <span v-if="languageS==='chinese' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[0]}}</span>
                              <span v-else-if="languageS==='english' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[1]}}</span>
                              <span v-else-if="languageS==='russian' && scope.row.countermeasure_effectiveness!==undefined && scope.row.countermeasure_effectiveness.split('/').length===3">
                                  {{scope.row.countermeasure_effectiveness.split('/')[2]}}</span>
                              <span v-else>{{scope.row.countermeasure_effectiveness}}</span>
                            </el-table-column>
                            <!-- 确认人 -->
                            <el-table-column
                                prop="confirmed_by"
                                :label="pageVal.minorDefectRecord.confirmed_by"
                                align="center">
                            </el-table-column>
                            <!-- 结题 -->
                            <el-table-column
                                prop="closing"
                                :label="pageVal.minorDefectRecord.closing"
                                align="center">
                            </el-table-column>
                            <!-- 编辑按钮 -->
                            <el-table-column
                                :label="main.edit"
                                width="100"
                                align="center"
                                v-slot:default="scope">
                              <el-link @click="editCountermeasureEffectiveness(4,scope)">
                                <i class="el-icon-edit"></i>
                              </el-link>
                            </el-table-column>
                          </el-table>
                        </template>
                      </el-table-column>
                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 班组 -->
                      <el-table-column
                          prop="team"
                          :label="pageVal.minorDefectRecord.team"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 提出人 -->
                      <el-table-column
                          prop="raised_by"
                          :label="pageVal.minorDefectRecord.raised_by"
                          align="center">
                      </el-table-column>
                      <!-- 日期 -->
                      <el-table-column
                          prop="date"
                          :label="pageVal.minorDefectRecord.date"
                          width="105"
                          align="center">
                      </el-table-column>
                      <!-- 车间 -->
                      <el-table-column
                          prop="workshop"
                          :label="pageVal.oilChecklist.workshop"
                          width="100"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.workshop}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.workshop.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.workshop.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.workshop.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 线体 -->
                      <el-table-column
                          prop="line"
                          :label="pageVal.fixtureTechnicalCondition.line"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 工序 -->
                      <el-table-column
                          prop="op"
                          :label="pageVal.oilChecklist.op"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 缺陷描述 -->
                      <el-table-column
                          prop="defect_description"
                          :label="pageVal.minorDefectRecord.defect_description"
                          width="160"
                          header-align="center"
                          :show-overflow-tooltip="true"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.defect_description}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.defect_description.split('|*|')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.defect_description.split('|*|')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.defect_description.split('|*|')[2]}}</span>
                      </el-table-column>
                      <!-- 责任人 -->
                      <el-table-column
                          prop="responsible_person"
                          :label="pageVal.minorDefectRecord.responsible_person"
                          align="center">
                      </el-table-column>
                      <!-- 是否汇报 -->
                      <el-table-column
                          prop="reporting"
                          :label="pageVal.minorDefectRecord.reporting"
                          align="center">
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          width="100"
                          v-slot:default="scope">
                        <el-link style="margin-right: 8px" @click="minorDefectRecordEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteMinorDefectRecordOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChangeMinorDefectRecord"
                        @current-change="handleCurrentChangeMinorDefectRecord"
                        :current-page="minorDefectRecordPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="minorDefectRecordPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="minorDefectRecordPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>
              </el-tabs>

              <!----------------------------------------制技油液--------------------------------------------->
              <el-tabs v-model="activeNameManufacturingOil" @tab-click="handleClickManufacturingOil" v-if="selectTree===4">
                <!--油液基本信息-->
                <el-tab-pane :label="main.oilBasicInformation" name="oilBasicInformation">
                  <div style="text-align: right;margin-bottom: 5px;margin-top: -0.5px;" >
                    <el-link size="small" @click="oilListEditShow(1,null)"><i class="el-icon-circle-plus-outline"></i></el-link>
                  </div>
                  <div :key="componentKey">
                    <el-table
                        :data="oilListData"
                        style="width: 100%"
                        :height="oilListHeight"
                        border
                        highlight-current-row> <!-- 设置表头行高度 -->>

                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>

                      <!-- 车间 -->
                      <el-table-column
                          prop="workshop"
                          :label="pageVal.oilChecklist.workshop"
                          width="90"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[0]}} </span>
                        <span v-else-if="languageS==='english' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[1]}} </span>
                        <span v-else-if="languageS==='russian' && scope.row.workshop!==undefined && scope.row.workshop.split('/').length===3">
                        {{scope.row.workshop.split('/')[2]}} </span>
                        <span v-else>{{scope.row.workshop}} </span>
                      </el-table-column>

                      <!-- 线体 -->
                      <el-table-column
                          prop="line"
                          :label="pageVal.fixtureTechnicalCondition.line"
                          width="80"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[0]}} </span>
                        <span v-else-if="languageS==='english' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[1]}} </span>
                        <span v-else-if="languageS==='russian' && scope.row.line!==undefined && scope.row.line.split('/').length===3">
                        {{scope.row.line.split('/')[2]}} </span>
                        <span v-else>{{scope.row.line}} </span>
                      </el-table-column>

                      <!-- 工序 -->
                      <el-table-column
                          prop="op"
                          :label="pageVal.oilChecklist.op"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 机型 -->
                      <el-table-column
                          prop="model"
                          :label="pageVal.fixtureTechnicalCondition.engine_model"
                          width="80"
                          align="center">
                      </el-table-column>

                      <!-- 设备名称 -->
                      <el-table-column
                          prop="equipment_name_chinese"
                          :label="pageVal.fixtureTechnicalCondition.equipment_name"
                          width="145"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese'">{{scope.row.equipment_name_chinese}}</span>
                        <span v-if="languageS==='english'">{{scope.row.equipment_name_english}}</span>
                        <span v-if="languageS==='russian'">{{scope.row.equipment_name_russian}}</span>
                      </el-table-column>

                      <!-- 油液名称 -->
                      <el-table-column
                          prop="oil_name_chinese"
                          :label="pageVal.oilChecklist.oil_name"
                          width="145"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese'">{{scope.row.oil_name_chinese}}</span>
                        <span v-if="languageS==='english'">{{scope.row.oil_name_english}}</span>
                        <span v-if="languageS==='russian'">{{scope.row.oil_name_russian}}</span>
                      </el-table-column>

                      <!-- 规格型号 -->
                      <el-table-column
                          prop="specification"
                          :label="pageVal.measuringToolsList.specification"
                          width="130"
                          align="center"
                          :show-overflow-tooltip="true">
                      </el-table-column>

                      <!-- 折光系数 -->
                      <el-table-column
                          prop="refractive_index"
                          :label="pageVal.oilChecklist.refractive_index"
                          width="70"
                          align="center">
                      </el-table-column>

                      <!-- 点检项目 -->
                      <el-table-column
                          prop="project"
                          :label="pageVal.oilChecklist.project"
                          width="180"
                          align="center"
                          :show-overflow-tooltip="true"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[0]}} </span>
                        <span v-else-if="languageS==='english' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[1]}} </span>
                        <span v-else-if="languageS==='russian' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[2]}} </span>
                        <span v-else>{{scope.row.project}} </span>
                      </el-table-column>

                      <!-- 点检要求 -->
                      <el-table-column
                          prop="requirement"
                          :label="pageVal.oilChecklist.requirement"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 标准值 -->
                      <el-table-column
                          prop="standard_value"
                          :label="pageVal.fixtureTechnicalCondition.standard_value"
                          width="100"
                          align="center">
                      </el-table-column>

                      <!-- 上限 -->
                      <el-table-column
                          prop="upper_limit"
                          :label="pageVal.oilChecklist.upper_limit"
                          width="100"
                          align="center">
                      </el-table-column>

                      <!-- 下限 -->
                      <el-table-column
                          prop="lower_limit"
                          :label="pageVal.oilChecklist.lower_limit"
                          width="100"
                          align="center">
                      </el-table-column>

                      <!-- 点检频次 -->
                      <el-table-column
                          prop="inspection_frequency"
                          :label="pageVal.measuringToolsList.inspection_frequency"
                          width="120"
                          align="center">
                      </el-table-column>

                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope"
                          v-if="usePower===111">
                        <el-link style="margin-right: 8px" @click="oilListEditShow(2,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteOilListOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                  </div>
                </el-tab-pane>
                <!--油液点检管理-->
                <el-tab-pane :label="main.oilInspectionManagement" name="oilInspectionManagement">
                  <div style="display: flex; width: 99.6%; border: 1px solid #ccc;margin-top: 5px;height: calc(100vh - 150px);">
                    <div style="width: 190px;padding: 8px; height: 98%; overflow: auto; border-right: 1px solid #ccc;" >
                      <el-tree
                          :data="machiningOpData"
                          :props="defaultProps"
                          accordion
                          @node-click="handleOilCheckTreeClick"
                          :height="null">
                      </el-tree>
                    </div>
                    <div style="flex: 1; border-right: 1px solid #ccc; padding: 8px; height: 100%;overflow: auto;">
                      <el-table
                          :data="[oilChecklistData[0]]"
                          style="width: 40vw"
                          border
                          highlight-current-row>
                        <!-- 设备名称 -->
                        <el-table-column
                            :label="pageVal.fixtureTechnicalCondition.equipment_name"
                            align="center"
                            v-slot:default="scope">
                          <span v-if="languageS==='chinese'">{{scope.row.equipment_name_chinese}}</span>
                          <span v-if="languageS==='english'">{{scope.row.equipment_name_english}}</span>
                          <span v-if="languageS==='russian'">{{scope.row.equipment_name_russian}}</span>
                        </el-table-column>
                        <!-- 油液名称 -->
                        <el-table-column
                            :label="pageVal.oilChecklist.oil_name"
                            width="130"
                            align="center"
                            v-slot:default="scope">
                          <span v-if="languageS==='chinese'">{{scope.row.oil_name_chinese}}</span>
                          <span v-if="languageS==='english'">{{scope.row.oil_name_english}}</span>
                          <span v-if="languageS==='russian'">{{scope.row.oil_name_russian}}</span>
                        </el-table-column>
                        <!-- 折光系数 -->
                        <el-table-column
                            :label="pageVal.oilChecklist.refractive_index"
                            width="100"
                            align="center"
                            v-slot:default="scope">
                          <span>{{scope.row.refractive_index}}</span>
                        </el-table-column>
                      </el-table>
                      <br>
                      <el-table
                          :data="oilChecklistData"
                          style="width: 62vw"
                          border
                          highlight-current-row>
                        <!-- 序号 -->
                        <el-table-column
                            :label="pageVal.measuringToolChecklist.order"
                            width="50"
                            align="center"
                            v-slot:default="scope">
                          {{scope.$index+1}}
                        </el-table-column>
                        <!-- 点检项目 -->
                        <el-table-column
                            :label="pageVal.oilChecklist.project"
                            align="center"
                            v-slot:default="scope">
                          <span v-if="languageS==='chinese' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[0]}} </span>
                          <span v-else-if="languageS==='english' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[1]}} </span>
                          <span v-else-if="languageS==='russian' && scope.row.project!==undefined && scope.row.project.split('/').length===3">
                        {{scope.row.project.split('/')[2]}} </span>
                          <span v-else>{{scope.row.project}} </span>
                        </el-table-column>
                        <!-- 点检要求 -->
                        <el-table-column
                            :label="pageVal.oilChecklist.requirement"
                            align="center"
                            v-slot:default="scope">
                          <span>{{scope.row.requirement}}</span>
                        </el-table-column>
                        <!-- 点检频次 -->
                        <el-table-column
                            :label="pageVal.measuringToolChecklist.inspection_frequency"
                            align="center"
                            v-slot:default="scope">
                          <span>{{scope.row.inspection_frequency}}</span>
                        </el-table-column>
                        <!-- 实测值 -->
                        <el-table-column
                            :label="pageVal.oilChecklist.actual_value"
                            width="130"
                            align="center"
                            v-slot:default="scope">
                          <el-input
                              v-model="scope.row.actual_value"
                              :disabled="isFieldDisabled(scope.row, 'actual_value')"
                              :placeholder="getActualValuePlaceholder(scope.row)">
                          </el-input>
                        </el-table-column>
                        <!-- 异常描述 -->
                        <el-table-column
                            :label="pageVal.measuringToolChecklist.abnormal_description"
                            width="150"
                            align="center"
                            v-slot:default="scope">
                          <el-input
                              v-model="scope.row.abnormal_description"
                              type="textarea"
                              :rows="2"
                              :placeholder="pageVal.inputAbnormalDescription">
                          </el-input>
                        </el-table-column>
                      </el-table>
                      <br>
                      <div style="display: flex; align-items: center; gap: 10px;">
                        <el-table
                            :data="oilCheckInfoData"
                            style="width: 40vw"
                            border
                            highlight-current-row>
                          <!-- 点检人 -->
                          <el-table-column
                              prop="check_person"
                              :label="pageVal.oilChecklist.check_person"
                              align="center"
                              v-slot:default="scope">
                            <el-input
                                v-model="scope.row.check_person">
                            </el-input>
                          </el-table-column>
                          <!-- 点检日期 -->
                          <el-table-column
                              prop="check_date"
                              :label="pageVal.oilChecklist.check_date"
                              align="center"
                              v-slot:default="scope">
                            <el-date-picker
                                style="width: 175px"
                                v-model="scope.row.check_date"
                                type="date"
                                :placeholder="main.selectDate"
                                value-format="yyyy-MM-dd"
                                format="yyyy-MM-dd"
                            @change="handleCheckDateChange">
                            </el-date-picker>
                          </el-table-column>
                          <!-- 点检班次 -->
                          <el-table-column
                              prop="check_shift"
                              :label="pageVal.oilChecklist.check_shift"
                              align="center"
                              v-slot:default="scope">
                            <el-select v-model="scope.row.check_shift" placeholder="请选择">
                              <el-option
                                  v-for="item in shiftOptions"
                                  :key="item.value"
                                  :label="item.label"
                                  :value="item.value">
                              </el-option>
                            </el-select>
                          </el-table-column>
                        </el-table>
                        <el-button type="primary" @click="saveOilCheckResult">{{pageVal.submit}}</el-button>
                        <el-button @click="cancelOilCheck">{{pageVal.cancel}}</el-button>
                      </div>

                    </div>
                  </div>
                </el-tab-pane>
                <!--油液原始数据-->
                <el-tab-pane :label="main.oilHistoricalData" name="oilHistoricalData">
                  <div style="text-align: left;overflow-x: auto">
                    <el-form :inline="true" @submit.prevent>
                      <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name">
                        <el-input v-model="oil_equipment_name" size="mini" style="width: 160px"></el-input>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.oil_name">
                        <el-input v-model="oil_name" size="mini" style="width: 160px"></el-input>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.project">
                        <el-select v-model="project" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option label="浓度/Concentration/Концентрация" value="浓度/Concentration/Концентрация"></el-option>
                          <el-option label="PH值/pH/pH" value="PH值/pH/pH"></el-option>
                          <el-option label="杂质含量/Impurity content/Содержание загрязнений" value="杂质含量/Impurity content/Содержание загрязнений"></el-option>
                          <el-option label="颗粒度/Granularity/Гранулярность" value="颗粒度/GranularityГранулярность"></el-option>
                          <el-option label="液位/Fluid Level/Уровень жидкости" value="液位/Fluid Level/Уровень жидкости"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.check_person">
                        <el-input v-model="check_person" style="width: 160px" size="mini"></el-input>
                      </el-form-item>
                      <el-form-item :label="pageVal.fixtureTechnicalCondition.line">
                        <el-select v-model="line" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option label="缸体线/Cylinder block line/линия блока цилиндров" value="缸体线/Cylinder block line/линия блока цилиндров"></el-option>
                          <el-option label="缸盖线/Cylinder head line/линия головки блока цилиндров" value="缸盖线/Cylinder head line/линия головки блока цилиндров"></el-option>
                          <el-option label="其他/Other/Другие" value="其他/Other/Другие"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.op">
                        <el-select v-model="op" :placeholder="main.select" style="width: 130px" size="mini">
                          <el-option label="OP05" value="OP05"></el-option>
                          <el-option label="OP10" value="OP10"></el-option>
                          <el-option label="OP20" value="OP20"></el-option>
                          <el-option label="OP20A" value="OP20A"></el-option>
                          <el-option label="OP20B" value="OP20B"></el-option>
                          <el-option label="OP30" value="OP30"></el-option>
                          <el-option label="OP30A" value="OP30A"></el-option>
                          <el-option label="OP30B" value="OP30B"></el-option>
                          <el-option label="OP40" value="OP40"></el-option>
                          <el-option label="OP50" value="OP50"></el-option>
                          <el-option label="OP60" value="OP60"></el-option>
                          <el-option label="OP70" value="OP70"></el-option>
                          <el-option label="OP75" value="OP75"></el-option>
                          <el-option label="OP80" value="OP80"></el-option>
                          <el-option label="OP90" value="OP90"></el-option>
                          <el-option label="OP100" value="OP100"></el-option>
                          <el-option label="OP105" value="OP105"></el-option>
                          <el-option label="OP110" value="OP110"></el-option>
                          <el-option label="OP120" value="OP120"></el-option>
                          <el-option label="OP130" value="OP130"></el-option>
                          <el-option label="OP135" value="OP135"></el-option>
                          <el-option label="OP140" value="OP140"></el-option>
                          <el-option label="OP150" value="OP150"></el-option>
                          <el-option label="OP160" value="OP160"></el-option>
                          <el-option label="OP170" value="OP170"></el-option>
                          <el-option label="OP180" value="OP180"></el-option>
                          <el-option label="OP190" value="OP190"></el-option>
                          <el-option label="OP200" value="OP200"></el-option>
                          <el-option label="其他/Other/Другие" value="其他/Other/Другие"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.check_date">
                        <el-date-picker
                            v-model="check_date"
                            type="date"
                            :placeholder="pageVal.selectDate"
                            value-format="yyyy-MM-dd"
                            format="yyyy-MM-dd"
                            style="width: 160px" size="mini">
                        </el-date-picker>
                      </el-form-item>
                      <el-form-item :label="pageVal.oilChecklist.check_shift">
                        <el-select v-model="check_shift" :placeholder="main.select" style="width: 175px" size="mini">
                          <el-option
                              v-for="item in shiftOptions"
                              :key="item.value"
                              :label="item.label"
                              :value="item.value">
                          </el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item>
                        <el-button type="primary" size="mini" @click="handleFilter">
                          <i class="el-icon-search"></i>
                        </el-button>
                        <el-button size="mini" @click="resetFilter">
                          <i class="el-icon-refresh"></i>
                        </el-button>
                        <el-button type="warning" size="mini" @click="exportOilHistoricalData" >
                          <i class="el-icon-download"></i>
                          {{ pageVal.oilChecklist.export }}
                        </el-button>
                      </el-form-item>
                    </el-form>
                  </div>
                  <div style="margin-top: -5px" :key="componentKey">
                    <el-table
                        :data="filteredOilHistoricalData"
                        style="width: 100%"
                        border
                        :height="oilHistoricalDataHeight">
                      <!-- 序号 -->
                      <el-table-column
                          :label="pageVal.measuringToolChecklist.order"
                          width="60"
                          align="center"
                          v-slot:default="scope">
                        {{scope.$index+1}}
                      </el-table-column>
                      <!-- 线体 -->
                      <el-table-column
                          prop="line"
                          :label="pageVal.fixtureTechnicalCondition.line"
                          width="120"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 工序 -->
                      <el-table-column
                          prop="op"
                          :label="pageVal.oilChecklist.op"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 设备名称 -->
                      <el-table-column
                          prop="equipment_name"
                          :label="pageVal.fixtureTechnicalCondition.equipment_name"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese'">{{scope.row.equipment_name_chinese}}</span>
                        <span v-if="languageS==='english'">{{scope.row.equipment_name_english}}</span>
                        <span v-if="languageS==='russian'">{{scope.row.equipment_name_russian}}</span>
                      </el-table-column>
                      <!-- 油液名称  -->
                      <el-table-column
                          prop="oil_name"
                          :label="pageVal.oilChecklist.oil_name"
                          width="125"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="languageS==='chinese'">{{scope.row.oil_name_chinese}}</span>
                        <span v-if="languageS==='english'">{{scope.row.oil_name_english}}</span>
                        <span v-if="languageS==='russian'">{{scope.row.oil_name_russian}}</span>
                      </el-table-column>
                      <!-- 点检项目 -->
                      <el-table-column
                          prop="project"
                          :label="pageVal.oilChecklist.project"
                          width="100"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.project.split('/').length<3">{{scope.row.project}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.project.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.project.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.project.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 点检要求 -->
                      <el-table-column
                          prop="requirement"
                          :label="pageVal.oilChecklist.requirement"
                          width="100"
                          align="center">
                      </el-table-column>
                      <!-- 点检频次 -->
                      <el-table-column
                          prop="inspection_frequency"
                          :label="pageVal.measuringToolsList.inspection_frequency"
                          width="90"
                          align="center">
                      </el-table-column>
                      <!-- 实测值 -->
                      <el-table-column
                          prop="actual_value"
                          :label="pageVal.oilChecklist.actual_value"
                          width="70"
                          align="center">
                      </el-table-column>
                      <!-- 异常描述 -->
                      <el-table-column
                            prop="abnormal_description"
                          :label="pageVal.measuringToolChecklist.abnormal_description"
                          width="140"
                          align="center">
                      </el-table-column>
                      <!-- 点检人 -->
                      <el-table-column
                          prop="check_person"
                          :label="pageVal.oilChecklist.check_person"
                          width="120"
                          align="center">
                      </el-table-column>
                      <!-- 点检日期 -->
                      <el-table-column
                          prop="check_date"
                          :label="pageVal.oilChecklist.check_date"
                          width="105"
                          align="center">
                      </el-table-column>
                      <!-- 点检班次 -->
                      <el-table-column
                          prop="check_shift"
                          :label="pageVal.oilChecklist.check_shift"
                          width="100"
                          align="center"
                          v-slot:default="scope">
                        <span v-if="scope.row.check_shift.split('/').length<3">{{scope.row.check_shift}}</span>
                        <span v-else-if="languageS==='chinese'">{{scope.row.check_shift.split('/')[0]}}</span>
                        <span v-else-if="languageS==='english'">{{scope.row.check_shift.split('/')[1]}}</span>
                        <span v-else-if="languageS==='russian'">{{scope.row.check_shift.split('/')[2]}}</span>
                      </el-table-column>
                      <!-- 编辑 -->
                      <el-table-column
                          :label="main.edit"
                          align="center"
                          v-slot:default="scope">
                        <el-link style="margin-right: 8px" @click="historicalDataEditShow(1,scope)">
                          <i class="el-icon-edit"></i>
                        </el-link>
                        <el-link style="margin-right: 8px" @click="deleteDataShow('deleteHistoricalDataOneRow',scope)">
                          <i class="el-icon-delete"></i>
                        </el-link>
                      </el-table-column>
                    </el-table>
                    <!-- 分页控件 -->
                    <el-pagination
                        @size-change="handleSizeChangeOilHistoricalData"
                        @current-change="handleCurrentChangeOilHistoricalData"
                        :current-page="oilHistoricalDataPagination.currentPage"
                        :page-sizes="[10, 20, 50, 100]"
                        :page-size="oilHistoricalDataPagination.pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="oilHistoricalDataPagination.total">
                    </el-pagination>
                  </div>
                </el-tab-pane>
                <!--油液趋势管理-->
                <el-tab-pane :label="main.oilTrendManagement" name="oilTrendManagement">
                  <div style="display: flex;margin-left: 10px;margin-right: 10px;height:34vh;overflow: auto">
                    <!--折线图-->
                    <div style="flex: 1;  border: 1px solid blue; margin-right: 10px">
                      <div ref="lineChart" style="width: 100%;height: 100%; margin-top: 17px"></div>
                    </div>
                    <!--ppk-->
                    <div style=" border: 1px solid blue; width: 200px; margin-right: 10px">
                      <div>
                        <!-- PPK/CPK 结果显示 -->
                        <div style="text-align: left; margin-left: 20px">
                          <p><strong style="color: red; font-size: 18px">ppk：{{ ppkResult.ppk }}</strong></p>
                          <p><strong style="color: red; font-size: 18px">cpk：{{ ppkResult.cpk }}</strong></p>
                        </div>
                        <!-- 趋势检测结果显示 -->
                        <div v-if="trendResult" style="text-align: left; margin-left: 20px">
                          <p>
                            <strong style="color: red; font-size: 18px">是否连续六点上升：{{ trendResult.hasContinuousIncreasing !== undefined ? (trendResult.hasContinuousIncreasing ? 'yes' : 'no') : '' }}</strong>
                            <el-link
                                v-if="trendResult.hasContinuousIncreasing"
                                @click="showTrendDialog('increasing')"
                                style="margin-left: 5px">
                              <i class="el-icon-view"></i>
                            </el-link>
                          </p>
                          <p>
                            <strong style="color: red; font-size: 18px">是否连续六点下降：{{ trendResult.hasContinuousDecreasing !== undefined ? (trendResult.hasContinuousDecreasing ? 'yes' : 'no') : '' }}</strong>
                            <el-link
                                v-if="trendResult.hasContinuousDecreasing"
                                @click="showTrendDialog('decreasing')"
                                style="margin-left: 5px">
                              <i class="el-icon-view"></i>
                            </el-link>
                          </p>
                        </div>
                      </div>
                    </div>
                    <!--选择？组数据-->
                    <div style="width: 150px; border: 1px solid blue;overflow: auto">
                      <div style="margin-top: 8px">
                        <el-button style="width: 130px" :style="{ backgroundColor:chartBackground25 , color:chartColor25}" @click="clickQuantityButton(25)">25组数据</el-button>
                      </div>
                      <div style="margin-top: 8px">
                        <el-button style="width: 130px" :style="{ backgroundColor:chartBackground50 , color:chartColor50}" @click="clickQuantityButton(50)">50组数据</el-button>
                      </div>
                      <div style="margin-top: 8px">
                        <el-button style="width: 130px" :style="{ backgroundColor:chartBackground125 , color:chartColor125}" @click="clickQuantityButton(125)">125组数据</el-button>
                      </div>
                      <div style="margin-top: 8px">
                        <el-button style="width: 130px" :style="{ backgroundColor:chartBackground300 , color:chartColor300}" @click="clickQuantityButton(300)">300组数据</el-button>
                      </div>
                      <div style="margin-top: 8px">
                        <el-button style="width: 130px" :style="{ backgroundColor:chartBackground500 , color:chartColor500}" @click="clickQuantityButton(500)">500组数据</el-button>
                      </div>
                    </div>
                  </div>
                  <div style="display: flex;margin-left: 10px;margin-right: 10px;margin-top:10px;height:33vh;overflow: auto">
                    <!--直方图-->
                    <div style="flex: 1;  border: 1px solid blue; margin-right: 10px">
                      <div ref="barChart" style="height:100%; width:100%; margin-top: 15px"></div>
                    </div>
                    <!--移动极差图-->
                    <div style="flex: 1;  border: 1px solid blue; margin-right: 10px">
                      <div ref="movingRangeChart" style="height: 100%; width:100%; margin-top: 15px"></div>
                    </div>
                    <div style="width: 360px; display: flex; border: 1px solid blue;">
                      <!-- 左侧树形结构，宽度100px -->
                      <div style="width: 140px; overflow-y: scroll" >
                        <el-tree
                            :data="machiningOpData"
                            :props="defaultProps"
                            accordion
                            @node-click="handleOilCheckTreeClick">
                        </el-tree>
                      </div>

                      <!-- 右侧表格，自动填充剩余宽度 -->
                      <div style="border: none; border-left: 1px solid blue; width: 220px">
                        <el-table
                            :data="oilTrendlistData"
                            border
                            height="100%"
                            @row-click="handleClickChart"
                            :row-style="oilProjectRowClassName">
                          <!-- 序号 -->
                          <el-table-column
                              :label="pageVal.measuringToolsList.order"
                              width="60"
                              align="center"
                              v-slot:default="scope">
                            {{scope.$index+1}}
                          </el-table-column>
                          <!-- 检测项目名称 project -->
                          <el-table-column
                              prop="project"
                              :label="pageVal.oilChecklist.project"
                              v-slot:default="scope"
                              width="158px">
                            <span v-if="scope.row.project.split('/').length<3">{{scope.row.project}}</span>
                            <span v-else-if="languageS==='chinese'">{{scope.row.project.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english'">{{scope.row.project.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian'">{{scope.row.project.split('/')[2]}}</span>
                          </el-table-column>
                        </el-table>
                      </div>
                    </div>
                  </div>
                </el-tab-pane>
              </el-tabs>

            </div>
            <!-- 页面初始空状态 -->
            <el-empty
                v-else
                :description="main.description"
                :image-size="160"
                style="margin: 45px auto;">
            </el-empty>
          </el-main>
          <el-footer class="el-footer" style="height: 44px">
            <el-button plain size="mini" @click="languageSelect('chinese')">中  文</el-button>
            <el-button plain size="mini" @click="languageSelect('russian')">Русский язык</el-button>
            <el-button plain size="mini" @click="languageSelect('english')">English</el-button>
          </el-footer>
        </el-container>
      </el-container>
    </el-container>

    <!-------------弹窗放置区-------------->
    <!--删除某一条数据的弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="deleteDataDialog"
        width="400px"
        :before-close="handleClose">
      <span>{{pageVal.sureToDelete}}</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteDataDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary"  size="mini" @click="deleteDataOk">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--新增一条或编辑某一条计量器具基本信息-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="measuringToolsListDialog"
        width="450px"
        :before-close="handleClose">
      <el-form :inline="true" ref="measuringToolsListForm" :model="measuringToolsListForm" label-width="150px" size="small">
        <el-form-item :label="pageVal.measuringToolsList.number" required>
          <el-input v-model="measuringToolsListForm.number"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name" required>
          <el-input v-model="measuringToolsListForm.name"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_english" required>
          <el-input v-model="measuringToolsListForm.name_english"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_russian" required>
          <el-input v-model="measuringToolsListForm.name_russian"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.specification" required>
          <el-input v-model="measuringToolsListForm.specification"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.is_checked" required>
          <el-select v-model="measuringToolsListForm.is_checked" style="width: 95%">
            <el-option label="yes" value="yes"></el-option>
            <el-option label="no" value="no"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.inspection_frequency" required>
          <el-select v-model="measuringToolsListForm.inspection_frequency" style="width: 95%">
            <el-option label="1shift" value="1shift"></el-option>
            <el-option label="1day" value="1day"></el-option>
            <el-option label="3days" value="3days"></el-option>
            <el-option label="1week" value="1week"></el-option>
            <el-option label="2weeks" value="2weeks"></el-option>
            <el-option label="1month" value="1month"></el-option>
            <el-option label="3months" value="3months"></el-option>
            <el-option label="6months" value="6months"></el-option>
            <el-option label="1year" value="1year"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.is_calibration" required>
          <el-select v-model="measuringToolsListForm.is_calibration" style="width: 95%">
            <el-option label="yes" value="yes"></el-option>
            <el-option label="no" value="no"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.calibration_cycle" required>
          <el-select v-model="measuringToolsListForm.calibration_cycle" style="width: 95%">
            <el-option label="1day" value="1day"></el-option>
            <el-option label="3days" value="3days"></el-option>
            <el-option label="1week" value="1week"></el-option>
            <el-option label="2weeks" value="2weeks"></el-option>
            <el-option label="1month" value="1month"></el-option>
            <el-option label="3months" value="3months"></el-option>
            <el-option label="6months" value="6months"></el-option>
            <el-option label="1year" value="1year"></el-option>
            <el-option label="——" value="——"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value" required>
          <el-input v-model="measuringToolsListForm.standard_value"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance" required>
          <el-input v-model="measuringToolsListForm.upper_tolerance"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance" required>
          <el-input v-model="measuringToolsListForm.lower_tolerance"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.engine_model" required>
          <el-select v-model="measuringToolsListForm.engine_model" style="width: 95%">
            <el-option label="EN" value="EN"></el-option>
            <el-option label="EB" value="EB"></el-option>
            <el-option label="EN/EB" value="EN/EB"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.section" required>
          <el-select v-model="measuringToolsListForm.section" style="width: 95%">
            <el-option label="机加/Machining Workshop/обработки Линия" value="机加车间"></el-option>
            <el-option label="装配/Assembly Workshop/Сборочная линия" value="装配车间"></el-option>
            <el-option label="产技/Quality Technology/технологий качества" value="品质技术科"></el-option>
            <el-option label="品管/Quality Management/управления качеством" value="品质管理科"></el-option>
            <el-option label="制技/Manufacture Tech/технологии производства" value="制造技术科"></el-option>
            <el-option label="物流/Logistics Department/Отдел логистики" value="物流科"></el-option>
            <el-option label="设备/Maintenance Utility/обслуживания оборудования" value="设备技术科"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.group" required>
          <el-select v-model="measuringToolsListForm.group" style="width: 95%">
            <el-option label="精测/Precision Measurement/Точность измерения" value="精测"></el-option>
            <el-option label="内检/Internal inspection/Внутренняя инспекция" value="内检"></el-option>
            <el-option label="外检/Appearance Inspection/Инспекция внешнего вида" value="外检"></el-option>
            <el-option label="成检/End Product Inspection/Kонечного продукта" value="成检"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="measuringToolsListDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="measuringToolsListOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!-- 二维码弹窗 -->
    <el-dialog
        :visible.sync="qrCodeDialog"
        width="300px">
      <div class="qr-container">
        <canvas id="qr-canvas" v-if="qrCodeDialog"></canvas>
      </div>
      <div class="qr-info">
        <p style="font-size: medium">编号: {{ currentNumber }}</p>
      </div>
      <span slot="footer" class="dialog-footer">
      <el-button @click="qrCodeDialog = false" size="mini">关闭</el-button>
      <el-button type="primary" @click="downloadQRCode" size="mini">下载</el-button>
    </span>
    </el-dialog>

    <!--开始点检的提示弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="startCheckDialog"
        width="450px"
        :before-close="handleClose"
        @opened="focusInput">

      <div style="margin-bottom: 15px">
        <span style="font-size: 20px; color: red">{{pageVal.startCheck}}</span>
      </div>

      <!-- 扫码输入框 -->
      <el-input
          ref="scanInput"
          v-model="scanCode"
          :placeholder="pageVal.scanPlaceholder"
          @keyup.enter.native="handleScan"
          clearable>
        <template #append>
          <el-button @click="handleManualInput" v-if="!scanCode">
            {{ pageVal.manualInput}}
          </el-button>
          <el-button @click="handleScan" v-else>
            {{ pageVal.confirm }}
          </el-button>
        </template>
      </el-input>

      <!-- 扫描结果显示 -->
      <div v-if="scanResult" style="margin-top: 10px; padding: 10px; border: 1px solid #e6e6e6; border-radius: 4px;"
           class="scan-result"
           @click="focusOnResultArea"
           tabindex="0"
           @keydown="handleResultAreaKeydown"
           ref="resultArea">
        <h3 style="margin-bottom: 15px;">{{ pageVal.checkInformation }}</h3>

        <el-form :model="scanDetails" label-width="140px">
          <el-form-item :label="pageVal.checkDialog.number">
            <span style="text-align: left; display: block;">{{ scanDetails.number }}</span>
          </el-form-item>
          <el-form-item :label="pageVal.checkDialog.name">
            <span style="text-align: left; display: block;">{{ scanDetails.name }}</span>
          </el-form-item>
          <el-form-item :label="pageVal.checkDialog.name_english">
            <span style="text-align: left; display: block;">{{ scanDetails.name_english }}</span>
          </el-form-item>
          <el-form-item :label="pageVal.checkDialog.name_russian">
            <span style="text-align: left; display: block;">{{ scanDetails.name_russian }}</span>
          </el-form-item>
          <el-form-item :label="pageVal.checkDialog.inspection_frequency">
            <span style="text-align: left; display: block;">{{ scanDetails.inspection_frequency }}</span>
          </el-form-item>
          <el-form-item :label="pageVal.checkDialog.is_qualified" required>
            <div style="text-align: left">
              <el-radio-group v-model="scanDetails.is_qualified">
                <el-radio label="YES">YES</el-radio>
                <el-radio label="NO">NO</el-radio>
              </el-radio-group>
            </div>
          </el-form-item>
          <el-form-item :label="pageVal.measuringToolChecklist.abnormal_description" v-if="scanDetails.is_qualified === 'NO'">
            <el-input
                v-model="scanDetails.abnormal_description"
                type="textarea"
                :rows="3"
                :placeholder="pageVal.inputAbnormalDescription">
            </el-input>
          </el-form-item>
        </el-form>
        <div style="text-align: center; margin-top: 20px;">
          <el-button type="primary" @click="saveCheckResult">{{pageVal.saveResult}}</el-button>
          <el-button @click="resetScan">{{pageVal.scanAgain}}</el-button>
        </div>
      </div>

      <!-- 加载状态 -->
      <div v-if="scanLoading" style="text-align: center; margin-top: 15px">
        <el-icon class="is-loading" style="font-size: 24px">
          <Loading />
        </el-icon>
        <span style="margin-left: 10px">{{ pageVal.scanning}}</span>
      </div>
    </el-dialog>

    <!--未点检的量检具明细-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="uncheckedMeasuringToolsDialog"
        width="700px"
        :before-close="handleClose">
      <el-table
        :data="uncheckedMeasuringTools"
        border>
        <el-table-column
        prop="number"
        :label="pageVal.measuringToolsList.number"
        align="center">
        </el-table-column>
        <el-table-column
            prop="name"
            :label="pageVal.measuringToolsList.name"
            align="center">
        </el-table-column>
        <el-table-column
            prop="name_english"
            :label="pageVal.measuringToolsList.name_english"
            align="center">
        </el-table-column>
        <el-table-column
            prop="name_russian"
            :label="pageVal.measuringToolsList.name_russian"
            align="center">
        </el-table-column>
        <el-table-column
            prop="group"
            :label="pageVal.measuringToolsList.group"
            sortable
            align="center"
            v-slot:default="scope">
          <span
              v-if="languageS==='chinese' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
              {{scope.row.group.split('/')[0]}}
          </span>
          <span
              v-else-if="languageS==='english' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
              {{scope.row.group.split('/')[1]}}
          </span>
          <span
              v-else-if="languageS==='russian' && scope.row.group!==undefined && scope.row.group.split('/').length===3">
              {{scope.row.group.split('/')[2]}}
          </span>
          <span
              v-else>
              {{scope.row.group}}
          </span>
        </el-table-column>
      </el-table>

      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="uncheckedMeasuringToolsDialog=false">{{pageVal.cancel}}</el-button>
        <el-button type="primary" size="mini" @click="uncheckedMeasuringToolsDialog=false">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--新增一条或编辑某一条计量器具校准记录-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="calibrationRecordListDialog"
        width="400px"
        :before-close="handleClose">
      <el-form :inline="true" ref="calibrationRecordListForm" :model="calibrationRecordListForm" label-width="110px" size="small">
        <el-form-item :label="pageVal.measuringToolsList.number" required>
          <el-input v-model="calibrationRecordListForm.number" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name" required>
          <el-input v-model="calibrationRecordListForm.name" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_english" required>
          <el-input v-model="calibrationRecordListForm.name_english" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_russian" required>
          <el-input v-model="calibrationRecordListForm.name_russian" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.specification" required>
          <el-input v-model="calibrationRecordListForm.specification" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value" required>
          <el-input v-model="calibrationRecordListForm.standard_value" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance" required>
          <el-input v-model="calibrationRecordListForm.upper_tolerance" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance" required>
          <el-input v-model="calibrationRecordListForm.lower_tolerance" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_result" required>
          <el-select v-model="calibrationRecordListForm.calibration_result" style="width: 94%">
            <el-option
                v-for="item in isQualifiedOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_value" required>
          <el-input v-model="calibrationRecordListForm.calibration_value">
          </el-input>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_date" required>
          <el-date-picker
              type="date"
              :placeholder="main.selectDate"
              v-model="calibrationRecordListForm.calibration_date"
              style="width: 88%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="calibrationRecordListDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="calibrationRecordListOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--历史校准记录-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="historicalInformationDialog"
        width="700px"
        :before-close="handleClose">
      <el-table
          :data="historicalInformation"
          border
          style="align-content: center">
        <el-table-column
            prop="standard_value"
            :label="pageVal.fixtureTechnicalCondition.standard_value"
            align="center">
        </el-table-column>
        <el-table-column
            prop="upper_tolerance"
            :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
            align="center">
        </el-table-column>
        <el-table-column
            prop="lower_tolerance"
            :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
            align="center">
        </el-table-column>
        <el-table-column
            prop="calibration_result"
            :label="pageVal.calibrationRecordList.calibration_result"
            v-slot:default="scope"
            align="center">
          <span
              v-if="languageS==='chinese' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[0]}}
                      </span>
          <span
              v-else-if="languageS==='english' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[1]}}
                      </span>
          <span
              v-else-if="languageS==='russian' && scope.row.calibration_result!==undefined && scope.row.calibration_result.split('/').length===3">
                        {{scope.row.calibration_result.split('/')[2]}}
                      </span>
          <span
              v-else>
                        {{scope.row.calibration_result}}
                      </span>
        </el-table-column>
        <el-table-column
            prop="calibration_value"
            :label="pageVal.calibrationRecordList.calibration_value"
            align="center">
        </el-table-column>
        <el-table-column
            prop="calibration_date"
            :label="pageVal.calibrationRecordList.calibration_date"
            align="center">
        </el-table-column>
        <el-table-column
            :label="main.edit"
            align="center"
            v-slot:default="scope"
            v-if="usePower===111">
          <el-link style="margin-right: 8px" @click="editHistoricalRow(scope.row)">
            <i class="el-icon-edit"></i>
          </el-link>
          <el-link @click="deleteHistoricalRow(scope.row)">
            <i class="el-icon-delete"></i>
          </el-link>
        </el-table-column>
      </el-table>

      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="historicalInformationDialog=false">{{pageVal.cancel}}</el-button>
        <el-button type="primary" size="mini" @click="historicalInformationDialog=false">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!-- 编辑历史记录弹窗 -->
    <el-dialog
        :title="titleMessage"
        :visible.sync="editHistoricalDialog"
        width="400px">

      <el-form :model="currentEditRow" label-width="120px">
        <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value">
          <el-input v-model="currentEditRow.standard_value" style="width: 94%"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance">
          <el-input v-model="currentEditRow.upper_tolerance" style="width: 94%"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance">
          <el-input v-model="currentEditRow.lower_tolerance" style="width: 94%"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_result" required>
          <el-select v-model="currentEditRow.calibration_result" style="width: 94%">
            <el-option
                v-for="item in isQualifiedOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_value">
          <el-input v-model="currentEditRow.calibration_value" style="width: 94%"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.calibrationRecordList.calibration_date">
          <el-date-picker
              v-model="currentEditRow.calibration_date"
              type="date"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editHistoricalDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="saveEdit" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--编辑某一条问题清单-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="questionListDialog"
        width="500px"
        :before-close="handleClose">
      <el-form :inline="true"
               ref="questionListForm"
               :model="questionListForm"
               label-width="135px"
               size="small">
        <!--问题分类-->
        <el-form-item :label="pageVal.correctAndPrevent.question_classification">
          <el-select v-model="questionListForm.question_classification" filterable clearable style="width: 95%" disabled>
            <el-option
                v-for="item in questionClassificationOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--问题来源-->
        <el-form-item :label="pageVal.correctAndPrevent.question_source">
          <el-select v-model="questionListForm.question_source" filterable clearable style="width: 95%" disabled>
            <el-option
                v-for="item in questionSourceOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--来源分类-->
        <el-form-item :label="pageVal.correctAndPrevent.source_classification">
          <el-select v-model="questionListForm.source_classification" filterable clearable style="width: 95%" disabled>
            <el-option
                v-for="item in sourceClassificationOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--责任部门-->
        <el-form-item :label="pageVal.correctAndPrevent.department">
          <el-select v-model="questionListForm.department" style="width: 95%" disabled>
            <el-option
                v-for="item in workshopOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--问题描述-->
        <el-form-item :label="pageVal.correctAndPrevent.question_description" required>
          <el-input v-model="questionListForm.question_description"></el-input>
        </el-form-item>
        <!--产生时间-->
        <el-form-item :label="pageVal.correctAndPrevent.generation_time">
          <el-date-picker
              v-model="questionListForm.generation_time"
              type="date"
              style="width: 90%"
              disabled>
          </el-date-picker>
        </el-form-item>
        <!--纠正人-->
        <el-form-item :label="pageVal.questionList.correct_person" required>
          <el-input v-model="questionListForm.correct_person"></el-input>
        </el-form-item>
        <!--纠正时间-->
        <el-form-item :label="pageVal.questionList.correct_time" required>
          <el-date-picker
              v-model="questionListForm.correct_time"
              type="date"
              style="width: 90%"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="questionListDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="questionListOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--问题清单中问题描述弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="questionDescriptionDialog"
        width="47%">
      <div>{{questionList.question_description}}</div>
      <el-table
          :data="questionList.uncheckedMeasuringToolsNumber"
          border
          style="margin-top: 20px;"
          height="300px">
        <el-table-column
            :label="pageVal.measuringToolsList.order"
            width="60"
            align="center"
            v-slot:default="scope">
          {{scope.$index+1}}
        </el-table-column>
        <el-table-column
            prop="number"
            :label="pageVal.measuringToolsList.number"
            align="center"
            width="190">
        </el-table-column>
        <el-table-column
            prop="date"
            :label="pageVal.correctAndPrevent.generation_time"
            align="center"
            width="120">
        </el-table-column>
        <el-table-column
            prop="isSupply"
            label="是否补点检"
            align="center"
            width="80">
        </el-table-column>
        <el-table-column
            :label="main.edit"
            align="center"
            v-slot:default="scope"
            v-if="usePower===111">
          <el-button type="text" @click="measuringToolsCheckSupplyShow(scope)">补点检</el-button>
        </el-table-column>
      </el-table>
    </el-dialog>
    <!--量检具补点检弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="measuringToolsCheckSupplyDialog"
        width="400px"
        :before-close="handleClose">
      <el-form
          :inline="true"
          ref="measuringToolChecklistForm"
          :model="measuringToolChecklistForm"
          label-width="110px"
          size="small">
        <el-form-item :label="pageVal.measuringToolsList.number" required>
          <el-input v-model="measuringToolChecklistForm.number" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name" required>
          <el-input v-model="measuringToolChecklistForm.name" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_english" required>
          <el-input v-model="measuringToolChecklistForm.name_english" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.name_russian" required>
          <el-input v-model="measuringToolChecklistForm.name_russian" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolsList.specification" required>
          <el-input v-model="measuringToolChecklistForm.specification" disabled></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolChecklist.is_qualified" required>
          <el-select v-model="measuringToolChecklistForm.is_qualified" style="width: 94%">
            <el-option label="yes" value="yes"></el-option>
            <el-option label="no" value="no"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolChecklist.abnormal_description">
          <el-input v-model="measuringToolChecklistForm.abnormal_description">
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="measuringToolsCheckSupplyDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="measuringToolsCheckSupplyOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--新增一条或编辑某一条工装技术条件-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="fixtureTechnicalConditionDialog"
        width="1150px"
        :before-close="handleClose">
      <el-form :inline="true"
               ref="fixtureTechnicalConditionForm"
               :model="fixtureTechnicalConditionForm"
               label-width="135px"
               size="small">
        <!--设备名称中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name" required>
            <el-input v-model="fixtureTechnicalConditionForm.equipment_name"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.equipment_name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.equipment_name_russian"></el-input>
          </el-form-item>
        </div>
        <!--设备型号-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_model" required>
            <el-input v-model="fixtureTechnicalConditionForm.equipment_model"></el-input>
          </el-form-item>
        </div>
        <!--类别中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.category" required>
            <el-input v-model="fixtureTechnicalConditionForm.category"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.category_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.category_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.category_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.category_russian"></el-input>
          </el-form-item>
        </div>
        <!--工装名称中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.fixture_name" required>
            <el-input v-model="fixtureTechnicalConditionForm.fixture_name"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.fixture_name_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.fixture_name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.fixture_name_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.fixture_name_russian"></el-input>
          </el-form-item>
        </div>
        <!--工装图纸编号-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.drawing_number" required>
            <el-input
                v-model="fixtureTechnicalConditionForm.drawing_number"
                :disabled="fixtureTechnicalConditionDoe === 2"></el-input>
          </el-form-item>
        </div>
        <!--应用机型-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.engine_model" required>
            <el-input v-model="fixtureTechnicalConditionForm.engine_model"></el-input>
          </el-form-item>
        </div>
        <!--控制项目中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_project" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_project"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_project_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_project_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_project_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_project_russian"></el-input>
          </el-form-item>
        </div>
        <!--评价/测量技术中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_technique" required>
            <el-input v-model="fixtureTechnicalConditionForm.measurement_technique"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_technique_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.measurement_technique_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_technique_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.measurement_technique_russian"></el-input>
          </el-form-item>
        </div>
        <!--测量类型-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_type" required>
            <el-select v-model="fixtureTechnicalConditionForm.measurement_type" style="width: 95%">
              <el-option label="计量/Record values/Запись числовое значение" value="计量/Record values/Запись числовое значение"></el-option>
              <el-option label="计数/Record results/Запись результатов" value="计数/Record results/Запись результатов"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <!--标准值、上公差、下公差-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value">
            <el-input v-model="fixtureTechnicalConditionForm.standard_value"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance">
            <el-input v-model="fixtureTechnicalConditionForm.upper_tolerance"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance">
            <el-input v-model="fixtureTechnicalConditionForm.lower_tolerance"></el-input>
          </el-form-item>
        </div>
        <!--容量-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.capacity" required>
            <el-select v-model="fixtureTechnicalConditionForm.capacity" style="width: 95%">
              <el-option label="1次/once/раз" value="1次/once/раз"></el-option>
              <el-option label="100%" value="100%"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <!--频次-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.frequency" required>
            <el-select v-model="fixtureTechnicalConditionForm.frequency" style="width: 95%">
              <el-option label="1month" value="1month"></el-option>
              <el-option label="3months" value="3months"></el-option>
              <el-option label="6months" value="6months"></el-option>
              <el-option label="1year" value="1year"></el-option>
              <el-option label="班前/before shift/перед сменой" value="班前/before shift/перед сменой"></el-option>
              <el-option label="连续/continuous/непрерывный" value="连续/continuous/непрерывный"></el-option>
              <el-option label="100%" value="100%"></el-option>
              <el-option label="更换时/when replacing/При замене" value="更换时/when replacing/При замене"></el-option>
              <el-option label="入厂检测/factory inspection/инспекция завода" value="入厂检测/factory inspection/инспекция завода"></el-option>
              <el-option label="≤250000 times or 2months，以先到为准" value="≤250000 times or 2months，以先到为准"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <!--控制方法中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_method" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_method"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_method_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_method_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.control_method_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.control_method_russian"></el-input>
          </el-form-item>
        </div>
        <!--失效模式中英俄-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.failure_mode" required>
            <el-input v-model="fixtureTechnicalConditionForm.failure_mode"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.failure_mode_english" required>
            <el-input v-model="fixtureTechnicalConditionForm.failure_mode_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.failure_mode_russian" required>
            <el-input v-model="fixtureTechnicalConditionForm.failure_mode_russian"></el-input>
          </el-form-item>
        </div>
        <!--责任部门-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.department" required>
            <el-select v-model="fixtureTechnicalConditionForm.department" style="width: 95%">
              <el-option label="机加/Machining Workshop/обработки Линия" value="机加/Machining Workshop/обработки Линия"></el-option>
              <el-option label="装配/Assembly Workshop/Сборочная линия" value="装配/Assembly Workshop/Сборочная линия"></el-option>
              <el-option label="产技/Quality Technology/технологий качества" value="产技/Quality Technology/технологий качества"></el-option>
              <el-option label="品管/Quality Management/управления качеством" value="品管/Quality Management/управления качеством"></el-option>
              <el-option label="制技/Manufacture Tech/технологии производства" value="制技/Manufacture Tech/технологии производства"></el-option>
              <el-option label="物流/Logistics Department/Отдел логистики" value="物流/Logistics Department/Отдел логистики"></el-option>
              <el-option label="设备/Maintenance Utility/обслуживания оборудования" value="设备/Maintenance Utility/обслуживания оборудования"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <!--工装来源-->
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.source" required>
            <el-select v-model="fixtureTechnicalConditionForm.source" style="width: 95%">
              <el-option label="工程下发/Issued/Выпущено" value="工程下发/Issued/Выпущено"></el-option>
              <el-option label="自行识别/Identified/Идентифицирован" value="自行识别/Identified/Идентифицирован"></el-option>
            </el-select>
          </el-form-item>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="fixtureTechnicalConditionDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="fixtureTechnicalConditionOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--新增一条或编辑某一条工装台账-->
    <el-dialog
        :title="titleMessage"
        v-if="fixtureListDialog"
        :visible.sync="fixtureListDialog"
        width="680px"
        :before-close="handleClose">
      <el-form
               ref="fixtureListForm"
               :model="fixtureListForm"
               label-width="135px"
               size="small">
        <!--车间-->
        <el-form-item :label="pageVal.fixtureList.workshop" required>
            <el-select v-model="fixtureListForm.workshop" style="width: 100%">
              <el-option
                  v-for="item in workshopOptions1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        <!--责任部门-->
        <el-form-item :label="pageVal.fixtureList.department" required>
            <el-select v-model="fixtureListForm.department" style="width: 100%">
              <el-option
                  v-for="item in workshopOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        <!--机床名称-->
        <el-form-item :label="pageVal.fixtureList.equipment_name" style="text-align: left" required>
          <text-translate
          :language-s="languageS"
          :rich-text-translate-data="equipment_name_translate"
          @content-change="equipmentNameTranslate"></text-translate>
        </el-form-item>
        <!--线体-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.line" required>
          <el-select v-model="fixtureListForm.line" style="width: 100%">
            <el-option
                v-for="item in lineOptions1"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--op/存放地点-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.op" required>
          <el-input v-model="fixtureListForm.op" style="width: 100%"></el-input>
        </el-form-item>
        <!--检查项目-->
        <el-form-item :label="pageVal.fixtureList.measurement_project" style="text-align: left" required>
          <text-translate
              :language-s="languageS"
              :rich-text-translate-data="measurement_project_translate"
              @content-change="measurementProjectTranslate"></text-translate>
        </el-form-item>
        <!--工装图纸编号-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.drawing_number" required>
          <el-select v-model="fixtureListForm.drawing_number" filterable clearable style="width: 100%"
                     @change="drawingNumberChange">
            <el-option
                v-for="item in drawingNumberOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <!--检查标准-->
        <el-form-item :label="pageVal.fixtureList.measurement_standard" style="text-align: left" required>
          <text-translate
              :language-s="languageS"
              :rich-text-translate-data="measurement_standard_translate"
              @content-change="measurementStandardTranslate"></text-translate>
        </el-form-item>
        <!--测量类型-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_type" required>
          <el-select v-model="fixtureListForm.measurement_type" style="width: 100%">
            <el-option label="计量/Record values/Запись числовое значение" value="计量/Record values/Запись числовое значение"></el-option>
            <el-option label="计数/Record results/Запись результатов" value="计数/Record results/Запись результатов"></el-option>
          </el-select>
        </el-form-item>
        <!--标准值-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value" required v-if="fixtureListForm.measurement_type==='计量/Record values/Запись числовое значение'">
          <el-input v-model="fixtureListForm.standard_value" style="width: 100%"></el-input>
        </el-form-item>
        <!--上公差-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance" required v-if="fixtureListForm.measurement_type==='计量/Record values/Запись числовое значение'">
          <el-input v-model="fixtureListForm.upper_tolerance" style="width: 100%"></el-input>
        </el-form-item>
        <!--下公差-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance" required v-if="fixtureListForm.measurement_type==='计量/Record values/Запись числовое значение'">
          <el-input v-model="fixtureListForm.lower_tolerance" style="width: 100%"></el-input>
        </el-form-item>
        <!--机型-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.engine_model" required>
          <el-input v-model="fixtureListForm.model" style="width: 100%"></el-input>
        </el-form-item>
        <!--评价测量技术-->
        <el-form-item :label="pageVal.fixtureTechnicalCondition.measurement_technique" style="text-align: left" required>
          <text-translate
              :language-s="languageS"
              :rich-text-translate-data="measurement_technique_translate"
              @content-change="measurementTechniqueTranslate"></text-translate>
        </el-form-item>
        <!--周期-->
        <el-form-item :label="pageVal.fixtureList.cycle" required>
          <el-select v-model="fixtureListForm.cycle" style="width: 100%">
            <el-option label="每月/Every month/каждый месяц" value="每月/Every month/каждый месяц"></el-option>
            <el-option label="每3月/Every 3 months/Каждые 3 месяца" value="每3月/Every 3 months/Каждые 3 месяца"></el-option>
            <el-option label="每半年/Every 6 months/Каждые шесть месяцев" value="每半年/Every 6 months/Каждые шесть месяцев"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="fixtureListDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="fixtureListOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--新增一条或编辑某一条油液基本信息-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="oilListDialog"
        width="1150px"
        :before-close="handleClose">
      <el-form :inline="true" ref="oilListForm" :model="oilListForm" label-width="140px" size="small">
        <div style="text-align: left">
          <el-form-item :label="pageVal.oilChecklist.workshop" required>
            <el-select v-model="oilListForm.workshop" style="width: 92%">
              <el-option
                  v-for="item in workshopOptions1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.line" required>
            <el-select v-model="oilListForm.line" style="width: 92%">
              <el-option
                  v-for="item in lineOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.op" required>
            <el-select v-model="oilListForm.op" style="width: 92%">
              <el-option
                  v-for="item in opOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.engine_model" required>
            <el-select v-model="oilListForm.model" style="width: 92%">
              <el-option label="EN" value="EN"></el-option>
              <el-option label="EB" value="EB"></el-option>
              <el-option label="EN/EB" value="EN/EB"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name" required>
            <el-input v-model="oilListForm.equipment_name_chinese"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name_english" required>
            <el-input v-model="oilListForm.equipment_name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.equipment_name_russian" required>
            <el-input v-model="oilListForm.equipment_name_russian"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.oilChecklist.oil_name" required>
            <el-input v-model="oilListForm.oil_name_chinese"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.oil_name_english" required>
            <el-input v-model="oilListForm.oil_name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.oil_name_russian" required>
            <el-input v-model="oilListForm.oil_name_russian"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.measuringToolsList.specification" required>
            <el-input v-model="oilListForm.specification"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.refractive_index" required>
            <el-input v-model="oilListForm.refractive_index"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.oilChecklist.project" required>
            <el-select v-model="oilListForm.project" style="width: 92%">
              <el-option label="浓度/Concentration/Концентрация" value="浓度/Concentration/Концентрация"></el-option>
              <el-option label="PH值/pH/pH" value="PH值/pH/pH"></el-option>
              <el-option label="杂质含量/Impurity content/Содержание загрязнений" value="杂质含量/Impurity content/Содержание загрязнений"></el-option>
              <el-option label="颗粒度/Granularity/Гранулярность" value="颗粒度/GranularityГранулярность"></el-option>
              <el-option label="液位/Fluid Level/Уровень жидкости" value="液位/Fluid Level/Уровень жидкости"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.requirement" required>
            <el-input v-model="oilListForm.requirement"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value" required>
            <el-input v-model="oilListForm.standard_value"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.upper_limit" required>
            <el-input v-model="oilListForm.upper_limit"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.lower_limit" required>
            <el-input v-model="oilListForm.lower_limit"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.measuringToolsList.inspection_frequency" required>
            <el-select v-model="oilListForm.inspection_frequency" style="width: 95%">
              <el-option label="1shift" value="1shift"></el-option>
              <el-option label="1day" value="1day"></el-option>
              <el-option label="Mon+Thur" value="Mon+Thur"></el-option>
              <el-option label="1week" value="1week"></el-option>
              <el-option label="2weeks" value="2weeks"></el-option>
            </el-select>
          </el-form-item>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="oilListDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="oilListOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--编辑某一条油液点检记录-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="oilChecklistDialog"
        width="400px"
        :before-close="handleClose">
      <el-form :inline="true" ref="oilChecklistForm" :model="oilChecklistForm" label-width="140px" size="small">
        <el-form-item :label="pageVal.oilChecklist.actual_value" required>
            <el-input v-model="oilChecklistForm.actual_value"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.measuringToolChecklist.abnormal_description" required>
          <el-input v-model="oilChecklistForm.abnormal_description"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.oilChecklist.check_person" required>
          <el-input v-model="oilChecklistForm.check_person"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.oilChecklist.check_date" required>
          <el-date-picker
              type="date"
              :placeholder="main.selectDate"
              v-model="oilChecklistForm.check_date"
              style="width: 88%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item :label="pageVal.oilChecklist.check_shift" required>
          <el-input v-model="oilChecklistForm.check_shift"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="oilChecklistDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="oilChecklistOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--显示连续六点上升/下降数据的弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="continuousDataDialog"
        width="80%">
      <el-table
          :data="continuousData"
          style="width: 100%"
          border
          :height="oilHistoricalDataHeight">
        <!-- 线体 -->
        <el-table-column
            prop="line"
            :label="pageVal.fixtureTechnicalCondition.line"
            width="120"
            align="center"
            v-slot:default="scope">
          <span v-if="scope.row.line.split('/').length<3">{{scope.row.line}}</span>
          <span v-else-if="languageS==='chinese'">{{scope.row.line.split('/')[0]}}</span>
          <span v-else-if="languageS==='english'">{{scope.row.line.split('/')[1]}}</span>
          <span v-else-if="languageS==='russian'">{{scope.row.line.split('/')[2]}}</span>
        </el-table-column>
        <!-- 工序 -->
        <el-table-column
            prop="op"
            :label="pageVal.oilChecklist.op"
            width="70"
            align="center">
        </el-table-column>
        <!-- 设备名称 -->
        <el-table-column
            prop="equipment_name"
            :label="pageVal.fixtureTechnicalCondition.equipment_name"
            width="125"
            align="center"
            v-slot:default="scope">
          <span v-if="languageS==='chinese'">{{scope.row.equipment_name_chinese}}</span>
          <span v-if="languageS==='english'">{{scope.row.equipment_name_english}}</span>
          <span v-if="languageS==='russian'">{{scope.row.equipment_name_russian}}</span>
        </el-table-column>
        <!-- 油液名称  -->
        <el-table-column
            prop="oil_name"
            :label="pageVal.oilChecklist.oil_name"
            width="125"
            align="center"
            v-slot:default="scope">
          <span v-if="languageS==='chinese'">{{scope.row.oil_name_chinese}}</span>
          <span v-if="languageS==='english'">{{scope.row.oil_name_english}}</span>
          <span v-if="languageS==='russian'">{{scope.row.oil_name_russian}}</span>
        </el-table-column>
        <!-- 点检项目 -->
        <el-table-column
            prop="project"
            :label="pageVal.oilChecklist.project"
            width="100"
            align="center"
            v-slot:default="scope">
          <span v-if="scope.row.project.split('/').length<3">{{scope.row.project}}</span>
          <span v-else-if="languageS==='chinese'">{{scope.row.project.split('/')[0]}}</span>
          <span v-else-if="languageS==='english'">{{scope.row.project.split('/')[1]}}</span>
          <span v-else-if="languageS==='russian'">{{scope.row.project.split('/')[2]}}</span>
        </el-table-column>
        <!-- 点检要求 -->
        <el-table-column
            prop="requirement"
            :label="pageVal.oilChecklist.requirement"
            width="100"
            align="center">
        </el-table-column>
        <!-- 点检频次 -->
        <el-table-column
            prop="inspection_frequency"
            :label="pageVal.measuringToolsList.inspection_frequency"
            width="90"
            align="center">
        </el-table-column>
        <!-- 实测值 -->
        <el-table-column
            prop="actual_value"
            :label="pageVal.oilChecklist.actual_value"
            width="70"
            align="center">
        </el-table-column>
        <!-- 异常描述 -->
        <el-table-column
            prop="abnormal_description"
            :label="pageVal.measuringToolChecklist.abnormal_description"
            width="140"
            align="center">
        </el-table-column>
        <!-- 点检人 -->
        <el-table-column
            prop="check_person"
            :label="pageVal.oilChecklist.check_person"
            width="120"
            align="center">
        </el-table-column>
        <!-- 点检日期 -->
        <el-table-column
            prop="check_date"
            :label="pageVal.oilChecklist.check_date"
            width="105"
            align="center">
        </el-table-column>
        <!-- 点检班次 -->
        <el-table-column
            prop="check_shift"
            :label="pageVal.oilChecklist.check_shift"
            width="100"
            align="center"
            v-slot:default="scope">
          <span v-if="scope.row.check_shift.split('/').length<3">{{scope.row.check_shift}}</span>
          <span v-else-if="languageS==='chinese'">{{scope.row.check_shift.split('/')[0]}}</span>
          <span v-else-if="languageS==='english'">{{scope.row.check_shift.split('/')[1]}}</span>
          <span v-else-if="languageS==='russian'">{{scope.row.check_shift.split('/')[2]}}</span>
        </el-table-column>
      </el-table>
    </el-dialog>

    <!--新增一条或编辑某一条微小缺陷-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="minorDefectRecordDialog"
        width="1150px"
        :before-close="handleClose">
      <el-form :inline="true" ref="minorDefectRecordForm" :model="minorDefectRecordForm" label-width="140px" size="small">
        <div style="text-align: left">
          <el-form-item :label="pageVal.oilChecklist.workshop" required>
            <el-select v-model="minorDefectRecordForm.workshop" style="width: 200px">
              <el-option
                  v-for="item in workshopOptions1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.line" required>
            <el-select v-model="minorDefectRecordForm.line" style="width: 200px">
              <el-option
                  v-for="item in lineOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.oilChecklist.op" required>
            <el-select v-model="minorDefectRecordForm.op" style="width: 200px">
              <el-option
                  v-for="item in opOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.minorDefectRecord.team" required>
            <el-select v-model="minorDefectRecordForm.team" style="width: 200px">
              <el-option
                  v-for="item in teamOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.raised_by" required>
            <el-input v-model="minorDefectRecordForm.raised_by" style="width: 200px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.date" required>
            <el-date-picker
                v-model="minorDefectRecordForm.date"
                type="date"
                style="width: 200px"
                value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.minorDefectRecord.defect_description_chinese" required>
            <el-input v-model="defect_description_chinese" type="textarea" autosize style="width: 200px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.defect_description_english" required>
            <el-input v-model="defect_description_english" type="textarea" autosize style="width: 200px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.defect_description_russian" required>
            <el-input v-model="defect_description_russian" type="textarea" autosize style="width: 200px"></el-input>
          </el-form-item>
        </div>
        <div style="margin-top: 1px; margin-bottom: 10px; text-align: right">
          <el-button @click="translate(3)">自动翻译|Automatic Translation|Автоматический перевод</el-button>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.minorDefectRecord.equipment_number">
            <el-input v-model="minorDefectRecordForm.equipment_number" style="width: 200px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.responsible_person" required>
            <el-input v-model="minorDefectRecordForm.responsible_person" style="width: 200px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.minorDefectRecord.reporting" required>
            <el-select v-model="minorDefectRecordForm.reporting" style="width: 200px">
              <el-option label="YES" value="YES"></el-option>
              <el-option label="NO" value="NO"></el-option>
            </el-select>
          </el-form-item>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="minorDefectRecordDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="minorDefectRecordOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑微小缺陷对策内容-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="countermeasureContentDialog"
        width="650px"
        :before-close="handleClose">
      <el-form :inline="true" ref="calibrationRecordListForm" :model="calibrationRecordListForm" label-width="110px" size="small">
        <el-form-item :label="pageVal.minorDefectRecord.countermeasure_content" required>
          <div v-loading="countermeasureContentLoading">
            <el-tabs v-model="pointsActiveTab" type="card" style="margin-top: 8px">
              <el-tab-pane :label="main.chinese" name="chinese">
                <div ref="countermeasure_content_chinese" style="text-align: left; height: 350px; overflow-y: auto;width: 500px"></div>
              </el-tab-pane>
              <el-tab-pane :label="main.english" name="english">
                <div ref="countermeasure_content_english" style="text-align: left; height: 350px; overflow-y: auto;width: 500px"></div>
              </el-tab-pane>
              <el-tab-pane :label="main.russian" name="russian">
                <div ref="countermeasure_content_russian" style="text-align: left; height: 350px; overflow-y: auto;width: 500px"></div>
              </el-tab-pane>
            </el-tabs>
          </div>
        </el-form-item>
        <el-form-item :label="pageVal.minorDefectRecord.completion_date" required>
          <el-date-picker
              type="date"
              :placeholder="main.selectDate"
              v-model="minorDefectRecordForm.completion_date"
              style="width: 88%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="success" @click="translate(1)" size="mini">{{pageVal.translate}}</el-button>
        <el-button @click="countermeasureContentDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="minorDefectCountermeasureOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑微小缺陷对策有效性-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="countermeasureEffectivenessDialog"
        width="450px"
        :before-close="handleClose">
      <el-form :inline="true" ref="minorDefectRecordForm" :model="minorDefectRecordForm" label-width="110px" size="small">
        <el-form-item :label="pageVal.minorDefectRecord.countermeasure_effectiveness" required>
          <el-select v-model="minorDefectRecordForm.countermeasure_effectiveness" style="width: 92%">
            <el-option label="有效/Effective/Эффективный" value="有效/Effective/Эффективный"></el-option>
            <el-option label="无效/Ineffective/Неэффективный" value="无效/Ineffective/Неэффективный"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="pageVal.minorDefectRecord.confirmed_by" required>
          <el-input v-model="minorDefectRecordForm.confirmed_by"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.minorDefectRecord.closing" required>
          <el-select v-model="minorDefectRecordForm.closing" style="width: 92%">
            <el-option label="YES" value="YES"></el-option>
            <el-option label="NO" value="NO"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="countermeasureEffectivenessDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="minorDefectCountermeasureOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>

    <!--编辑特急分解检测标准-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="urgentTeardownStandardDialog"
        width="1150px"
        :before-close="handleClose">
      <el-form :inline="true" ref="urgentTeardownStandardForm" :model="urgentTeardownStandardForm" label-width="140px" size="small">
        <div style="text-align: left">
          <el-form-item :label="pageVal.urgentTeardown.engine_model" required>
            <el-select v-model="urgentTeardownStandardForm.engine_model" style="width: 92%" :placeholder="main.select">
              <el-option label="EB05" value="EB05"></el-option>
              <el-option label="EB35" value="EB35"></el-option>
              <el-option label="EB75" value="EB75"></el-option>
              <el-option label="EN19" value="EN19"></el-option>
              <el-option label="EN38" value="EN38"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.part_number" required>
            <el-select v-model="urgentTeardownStandardForm.part_number"
                       filterable
                       style="width: 92%"
                       :placeholder="main.select"
                       @change="handlePartNumberChange">
              <el-option
                  v-for="item in partsListOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.urgentTeardown.part_name_chinese">
            <el-input v-model="text1" disabled></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.part_name_english">
            <el-input v-model="text2" disabled></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.part_name_russian">
            <el-input v-model="text3" disabled></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.urgentTeardown.measurement_project_chinese" required>
            <el-input v-model="text4"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.measurement_project_english" required>
            <el-input v-model="text5"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.measurement_project_russian" required>
            <el-input v-model="text6"></el-input>
          </el-form-item>
        </div>
        <div style="margin-top: 3px;text-align: right">
          <el-button @click="translate(2)">自动翻译|Automatic Translation|Автоматический перевод</el-button>
        </div>
        <hr>
        <div style="text-align: left">
          <el-form-item :label="pageVal.urgentTeardown.category" required>
            <el-select v-model="urgentTeardownStandardForm.category" style="width: 92%" :placeholder="main.select">
              <el-option label="检测/Measuring/Измерение" value="检测/Measuring/Измерение"></el-option>
              <el-option label="拍照/Take photos/Снимайте фотографии" value="拍照/Take photos/Снимайте фотографии"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left" v-if="urgentTeardownStandardForm.category==='检测/Measuring/Измерение'">
          <el-form-item :label="pageVal.fixtureTechnicalCondition.standard_value" required>
            <el-input v-model="urgentTeardownStandardForm.standard_value"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.upper_tolerance" required>
            <el-input v-model="urgentTeardownStandardForm.upper_tolerance"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.fixtureTechnicalCondition.lower_tolerance" required>
            <el-input v-model="urgentTeardownStandardForm.lower_tolerance"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.urgentTeardown.standard_setter" required>
            <el-input v-model="urgentTeardownStandardForm.standard_setter"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.approver" required>
            <el-input v-model="urgentTeardownStandardForm.approver"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.urgentTeardown.measurement_place" required>
            <el-select v-model="urgentTeardownStandardForm.measurement_place" style="width: 92%" :placeholder="main.select">
              <el-option label="品管/Quality Management/Управления качеством" value="品管/Quality Management/Управления качеством"></el-option>
              <el-option label="内检/Internal inspection/Внутренняя инспекция" value="内检/Internal inspection/Внутренняя инспекция"></el-option>
              <el-option label="外检/Appearance inspection/Инспекция внешнего вида" value="外检/Appearance inspection/Инспекция внешнего вида"></el-option>
              <el-option label="精测/Precision measurement/Точность измерения" value="精测/Precision measurement/Точность измерения"></el-option>
              <el-option label="清洁度室/Cleanliness room/Чистота комнаты" value="清洁度室/Cleanliness room/Чистота комнаты"></el-option>
              <el-option label="外部/External/Внешний" value="外部/External/Внешний"></el-option>
            </el-select>
          </el-form-item>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="urgentTeardownStandardDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="urgentTeardownStandardOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--我要送检的弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="sendToMeasureDialog"
        width="90%"
        :before-close="handleClose">
      <div>
        <el-radio-group v-model="selectEngineModel" @change="handleRadioChange">
          <el-radio label="EB05"></el-radio>
          <el-radio label="EB35"></el-radio>
          <el-radio label="EB75"></el-radio>
          <el-radio label="EN19"></el-radio>
          <el-radio label="EN38"></el-radio>
        </el-radio-group>
      </div>
      <div style="text-align: left;margin-bottom: 10px;font-size: 16px">
        {{pageVal.urgentTeardown.measurement_project1}}
      </div>
      <div>
        <el-table
            :data="filteredUrgentTeardownStandardData"
            style="width: 100%"
            height="350"
            border
            highlight-current-row>

          <!-- 序号 -->
          <el-table-column
              :label="pageVal.measuringToolChecklist.order"
              width="60"
              align="center"
              v-slot:default="scope">
            {{scope.$index+1}}
          </el-table-column>
          <!-- 机型 -->
          <el-table-column
              prop="engine_model"
              :label="pageVal.urgentTeardown.engine_model"
              align="center">
          </el-table-column>
          <!-- 零部件图号 -->
          <el-table-column
              prop="part_number"
              :label="pageVal.urgentTeardown.part_number"
              align="center">
          </el-table-column>
          <!-- 零部件名称 -->
          <el-table-column
              prop="part_name"
              :label="pageVal.urgentTeardown.part_name"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.part_name}}</span>
          </el-table-column>
          <!-- 检测项目 -->
          <el-table-column
              prop="measurement_project"
              :label="pageVal.urgentTeardown.measurement_project"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.measurement_project}}</span>
          </el-table-column>
          <!-- 类别 -->
          <el-table-column
              prop="category"
              :label="pageVal.urgentTeardown.category"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.category!==undefined && scope.row.category.split('/').length===3">
                        {{scope.row.category.split('/')[2]}}</span>
            <span v-else>{{scope.row.category}}</span>
          </el-table-column>
          <!-- 标准值 -->
          <el-table-column
              prop="standard_value"
              :label="pageVal.fixtureTechnicalCondition.standard_value"
              align="center">
          </el-table-column>
          <!-- 上公差 -->
          <el-table-column
              prop="upper_tolerance"
              :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
              align="center">
          </el-table-column>
          <!-- 下公差 -->
          <el-table-column
              prop="lower_tolerance"
              :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
              align="center">
          </el-table-column>
          <!-- 标准建立人 -->
          <el-table-column
              prop="standard_setter"
              :label="pageVal.urgentTeardown.standard_setter"
              align="center">
          </el-table-column>
          <!-- 批准人 -->
          <el-table-column
              prop="approver"
              :label="pageVal.urgentTeardown.approver"
              align="center">
          </el-table-column>
          <!-- 检测地点 -->
          <el-table-column
              prop="measurement_place"
              :label="pageVal.urgentTeardown.measurement_place"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.measurement_place!==undefined && scope.row.measurement_place.split('/').length===3">
                        {{scope.row.measurement_place.split('/')[2]}}</span>
            <span v-else>{{scope.row.measurement_place}}</span>
          </el-table-column>
        </el-table>
      </div>
      <div style="margin-top: 10px">
        <el-form :inline="true" ref="urgentTeardownResultForm" :model="urgentTeardownResultForm" label-width="140px" size="small">
          <div style="text-align: left">
            <el-form-item :label="pageVal.urgentTeardown.urgent_teardown_number" required>
              <el-input v-model="urgentTeardownResultForm.urgent_teardown_number" style="width: 200px"></el-input>
            </el-form-item>
            <el-form-item :label="pageVal.urgentTeardown.send_measurement_person" required>
              <el-input v-model="urgentTeardownResultForm.send_measurement_person" style="width: 200px"></el-input>
            </el-form-item>
            <el-form-item :label="pageVal.urgentTeardown.engine_number" required>
              <el-input v-model="urgentTeardownResultForm.engine_number" style="width: 200px"></el-input>
            </el-form-item>
          </div>
          <div style="text-align: left">
            <el-form-item :label="pageVal.urgentTeardown.urgent_teardown_name" required>
              <el-select v-model="urgentTeardownResultForm.urgent_teardown_name" style="width: 200px" :placeholder="main.select">
                <el-option label="正常分解/Normal teardown/Нормальный разрыв" value="正常分解/Normal teardown/Нормальный разрыв"></el-option>
                <el-option label="特殊分解/Special teardown/Специальный разрыв" value="特殊分解/Special teardown/Специальный разрыв"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="pageVal.urgentTeardown.notes">
              <el-input v-model="urgentTeardownResultForm.notes" type="textarea" autosize style="width: 200px"></el-input>
            </el-form-item>
          </div>
        </el-form>
      </div>
      <div style="margin-top: 10px; text-align: right">
        <el-button @click="sendToMeasureDialog = false">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="sendToMeasureOk">{{pageVal.ok}}</el-button>
      </div>
    </el-dialog>
    <!--编辑特急分解检测结果(检测)-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="urgentTeardownResultMeasureDialog"
        width="450px"
        :before-close="handleClose">
      <el-form :inline="true" ref="urgentTeardownResultForm" :model="urgentTeardownResultForm" label-width="140px" size="small">
        <el-form-item :label="pageVal.urgentTeardown.actual_value" required>
          <el-input v-model="urgentTeardownResultForm.actual_value"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.urgentTeardown.measuring_picture_person" required>
          <el-input v-model="urgentTeardownResultForm.measuring_picture_person"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.urgentTeardown.measurement_date" required>
          <el-date-picker
              type="date"
              :placeholder="main.selectDate"
              v-model="urgentTeardownResultForm.measurement_date"
              style="width: 88%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="urgentTeardownResultMeasureDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="urgentTeardownResultOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑特急分解检测结果(拍照)-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="urgentTeardownResultPictureDialog"
        width="500px"
        :before-close="handleClose">
      <el-form :inline="true" ref="urgentTeardownResultForm" :model="urgentTeardownResultForm" label-width="140px" size="small">
        <el-form-item :label="pageVal.urgentTeardown.uploadPicture" required>
          <el-upload
              class="avatar-uploader"
              action="http://10.255.96.48:3499/russiaEngine/"
              :show-file-list="false"
              :on-success="handleAvatarSuccess"
              :before-upload="beforeAvatarUpload"
              :auto-upload="true">
            <img v-if="imageUrl" :src="imageUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
        <el-form-item :label="pageVal.urgentTeardown.measuring_picture_person" required>
          <el-input v-model="urgentTeardownResultForm.measuring_picture_person"></el-input>
        </el-form-item>
        <el-form-item :label="pageVal.urgentTeardown.measurement_date" required>
          <el-date-picker
              type="date"
              :placeholder="main.selectDate"
              v-model="urgentTeardownResultForm.measurement_date"
              style="width: 88%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="urgentTeardownResultPictureDialog = false" size="mini">{{pageVal.cancel}}</el-button>
        <el-button type="primary" @click="urgentTeardownResultOk" size="mini">{{pageVal.ok}}</el-button>
      </span>
    </el-dialog>
    <!--上传检测结果的弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="uploadUrgentTeardownResultDialog"
        width="90%"
        :before-close="handleClose">
      <div style="text-align: left;margin-bottom: 10px;font-size: 16px">
        <div style="display: flex; gap: 10px; align-items: center;">
          <el-input
              v-model="urgentTeardownNumber"
              @change="handleUrgentTeardownNumberChange"
              placeholder="请输入特急分解编号/Input urgent teardown number/Введите номер срочного разрыва"
              style="flex: 1;">
          </el-input>
          <el-upload
              ref="excelUpload"
              action="http://10.255.96.48:3499/russiaEngine/"
              :show-file-list="false"
              :auto-upload="false"
              accept=".xlsx, .xls"
              :on-change="handleUploadSuccess"
              :on-error="handleUploadError">
            <el-button>{{pageVal.urgentTeardown.uploadExcel}}</el-button>
          </el-upload>
        </div>
      </div>
      <div>
        <el-table
            :data="urgentTeardownResultData"
            style="width: 100%"
            height="355"
            border
            highlight-current-row>
          <!-- 序号 -->
          <el-table-column
              :label="pageVal.measuringToolChecklist.order"
              width="60"
              align="center"
              v-slot:default="scope">
            {{scope.$index+1}}
          </el-table-column>
          <!-- 特急分解编号 -->
          <el-table-column
              prop="urgent_teardown_number"
              :label="pageVal.urgentTeardown.urgent_teardown_number"
              align="center">
          </el-table-column>
          <!-- 零部件图号 -->
          <el-table-column
              prop="part_number"
              :label="pageVal.urgentTeardown.part_number"
              align="center">
          </el-table-column>
          <!-- 零部件名称 -->
          <el-table-column
              prop="part_name"
              :label="pageVal.urgentTeardown.part_name"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.part_name}}</span>
          </el-table-column>
          <!-- 检测项目 -->
          <el-table-column
              prop="measurement_project"
              :label="pageVal.urgentTeardown.measurement_project"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.measurement_project}}</span>
          </el-table-column>
          <!-- 标准值 -->
          <el-table-column
              prop="standard_value"
              :label="pageVal.fixtureTechnicalCondition.standard_value"
              align="center">
          </el-table-column>
          <!-- 上公差 -->
          <el-table-column
              prop="upper_tolerance"
              :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
              align="center">
          </el-table-column>
          <!-- 下公差 -->
          <el-table-column
              prop="lower_tolerance"
              :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
              align="center">
          </el-table-column>
          <!-- 实测值 -->
          <el-table-column
              prop="actual_value"
              :label="pageVal.urgentTeardown.actual_value"
              width="90"
              v-slot:default="scope"
              align="center">
            <el-input v-model="scope.row.actual_value"></el-input>
          </el-table-column>
          <!-- 检测日期 -->
          <el-table-column
              prop="measurement_date"
              :label="pageVal.urgentTeardown.measurement_date"
              width="130"
              v-slot:default="scope"
              align="center">
            <el-input v-model="scope.row.measurement_date"></el-input>
          </el-table-column>
          <!-- 检测人 -->
          <el-table-column
              prop="measuring_picture_person"
              :label="pageVal.urgentTeardown.measuring_picture_person"
              width="100"
              v-slot:default="scope"
              align="center">
            <el-input v-model="scope.row.measuring_picture_person"></el-input>
          </el-table-column>
        </el-table>
      </div>
      <div style="margin-top: 10px">
        <el-form :inline="true" ref="urgentTeardownResultForm" :model="urgentTeardownResultForm" label-width="140px" size="small">
          <div style="text-align: left">
            <el-form-item :label="pageVal.urgentTeardown.measuring_picture_person" required>
              <el-input v-model="urgentTeardownResultForm.measuring_picture_person" style="width: 200px" @change="personEdit"></el-input>
            </el-form-item>
            <el-form-item :label="pageVal.urgentTeardown.measurement_date" required>
              <el-date-picker
                  type="date"
                  :placeholder="main.selectDate"
                  v-model="urgentTeardownResultForm.measurement_date"
                  style="width: 200px"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  @change="dateEdit">
              </el-date-picker>
            </el-form-item>
          </div>
        </el-form>
      </div>
      <div style="margin-top: 10px; text-align: right">
        <el-button type="primary" @click="uploadUrgentTeardownResultOk">{{pageVal.submit}}</el-button>
      </div>
    </el-dialog>
    <!--分解完成的弹窗-->
    <el-dialog
        :title="titleMessage"
        :visible.sync="finishUrgentTeardownResultDialog"
        width="90%"
        :before-close="handleClose">
      <div style="text-align: left;margin-bottom: 10px;font-size: 16px">
        <div style="display: flex; gap: 10px; align-items: center;">
          <el-input
              v-model="urgentTeardownNumber"
              @change="handleUrgentTeardownNumberChange1"
              placeholder="请输入特急分解编号/Input urgent teardown number/Введите номер срочного разрыва"
              style="flex: 1;">
          </el-input>
        </div>
      </div>
      <div>
        <el-table
            :data="urgentTeardownResultData"
            style="width: 100%"
            height="355"
            border
            highlight-current-row>
          <!-- 序号 -->
          <el-table-column
              :label="pageVal.measuringToolChecklist.order"
              width="60"
              align="center"
              v-slot:default="scope">
            {{scope.$index+1}}
          </el-table-column>
          <!-- 特急分解编号 -->
          <el-table-column
              prop="urgent_teardown_number"
              :label="pageVal.urgentTeardown.urgent_teardown_number"
              align="center">
          </el-table-column>
          <!-- 零部件图号 -->
          <el-table-column
              prop="part_number"
              :label="pageVal.urgentTeardown.part_number"
              align="center">
          </el-table-column>
          <!-- 零部件名称 -->
          <el-table-column
              prop="part_name"
              :label="pageVal.urgentTeardown.part_name"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.part_name!==undefined && scope.row.part_name.split('|*|').length===3">
                        {{scope.row.part_name.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.part_name}}</span>
          </el-table-column>
          <!-- 检测项目 -->
          <el-table-column
              prop="measurement_project"
              :label="pageVal.urgentTeardown.measurement_project"
              align="center"
              v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[0]}}</span>
            <span v-else-if="languageS==='english' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[1]}}</span>
            <span v-else-if="languageS==='russian' && scope.row.measurement_project!==undefined && scope.row.measurement_project.split('|*|').length===3">
                        {{scope.row.measurement_project.split('|*|')[2]}}</span>
            <span v-else>{{scope.row.measurement_project}}</span>
          </el-table-column>
          <!-- 标准值 -->
          <el-table-column
              prop="standard_value"
              :label="pageVal.fixtureTechnicalCondition.standard_value"
              align="center">
          </el-table-column>
          <!-- 上公差 -->
          <el-table-column
              prop="upper_tolerance"
              :label="pageVal.fixtureTechnicalCondition.upper_tolerance"
              align="center">
          </el-table-column>
          <!-- 下公差 -->
          <el-table-column
              prop="lower_tolerance"
              :label="pageVal.fixtureTechnicalCondition.lower_tolerance"
              align="center">
          </el-table-column>
          <!-- 实测值 -->
          <el-table-column
              prop="actual_value"
              :label="pageVal.urgentTeardown.actual_value"
              width="90"
              align="center">
          </el-table-column>
          <!-- 检测日期 -->
          <el-table-column
              prop="measurement_date"
              :label="pageVal.urgentTeardown.measurement_date"
              width="130"
              align="center">
          </el-table-column>
          <!-- 检测人 -->
          <el-table-column
              prop="measuring_picture_person"
              :label="pageVal.urgentTeardown.measuring_picture_person"
              width="100"
              align="center">
          </el-table-column>
          <!-- 是否完成 -->
          <el-table-column
              prop="finish"
              :label="pageVal.urgentTeardown.finish"
              width="80"
              align="center"
              v-slot:default="scope">
            <el-select v-model="scope.row.finish">
              <el-option label="Yes" value="Yes"></el-option>
              <el-option label="No" value="No"></el-option>
            </el-select>
          </el-table-column>
        </el-table>
      </div>
      <div style="margin-top: 10px">
        <el-form :inline="true" ref="urgentTeardownResultForm" :model="urgentTeardownResultForm" label-width="140px" size="small">
          <div style="text-align: left">
            <el-form-item :label="pageVal.urgentTeardown.finish" required>
              <el-select v-model="urgentTeardownResultForm.finish" @change="finishEdit">
                <el-option label="Yes" value="Yes"></el-option>
                <el-option label="No" value="No"></el-option>
              </el-select>
            </el-form-item>
          </div>
        </el-form>
      </div>
      <div style="margin-top: 10px; text-align: right">
        <el-button type="primary" @click="finishUrgentTeardownResultOk">{{pageVal.submit}}</el-button>
      </div>
    </el-dialog>

    <!----------抽屉放置区域------------>
    <!--查看纠正预防详情的抽屉-->
    <el-drawer
        :visible.sync="correctAndPreventDrawer"
        direction="ttb"
        :before-close="handleClose"
        :with-header="false"
        size="50%"
        style="overflow: scroll">
      <table style="width: 99%; border-collapse: collapse; border: 1px solid blue;margin-top: 30px;margin-left: 10px">
        <tr>
          <th style="border: 1px solid blue; padding: 8px;">{{pageVal.correctAndPrevent.question_description}}</th>
          <th style="border: 1px solid blue; padding: 8px;">{{pageVal.correctAndPrevent.cause_analysis}}</th>
          <th style="border: 1px solid blue; padding: 8px;" colspan="2">{{pageVal.correctAndPrevent.corrective_action}}</th>
          <th style="border: 1px solid blue; padding: 8px; width: 100px">{{pageVal.correctAndPrevent.responsible_person}}</th>
          <th style="border: 1px solid blue; padding: 8px; width: 120px">{{pageVal.correctAndPrevent.completion_time}}</th>
        </tr>
        <tr>
          <td rowspan="3" style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.question_description}}</td> <!-- 问题描述跨3行 -->
          <td rowspan="3" style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.cause_analysis}}</td> <!-- 原因分析跨3行 -->
          <td style="border: 1px solid blue; padding: 8px;width: 80px">{{pageVal.correctAndPrevent.correct}}</td>
          <td style="border: 1px solid blue; padding: 8px;width: 300px">{{correctAndPreventForm.a_corrective_action}}</td><!-- 整改对策第一行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.a_responsible_person}}</td> <!-- 负责人第一行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.a_completion_time}}</td> <!-- 完成时间第一行 -->
        </tr>
        <tr>
          <td style="border: 1px solid blue; padding: 8px;">{{pageVal.correctAndPrevent.corrective_measure}}</td> <!-- 整改对策第二行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.b_corrective_action}}</td>
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.b_responsible_person}}</td><!-- 负责人第二行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.b_completion_time}}</td> <!-- 完成时间第二行 -->
        </tr>
        <tr>
          <td style="border: 1px solid blue; padding: 8px;">{{pageVal.correctAndPrevent.preventive_measure}}</td> <!-- 整改对策第三行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.c_corrective_action}}</td>
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.c_responsible_person}}</td><!-- 负责人第三行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{correctAndPreventForm.c_completion_time}}</td> <!-- 完成时间第三行 -->
        </tr>
      </table>
    </el-drawer>
  </div>
</template>

<script>

import _ from "lodash";
import {getDaysInMonth, parseISO} from 'date-fns';
import QRCode from 'qrcode';
import * as XLSX from 'xlsx'
import * as echarts from "echarts";
import E from "wangeditor";
import {translate_zh_en_ru} from "@/components/utils/useUtils";
import TextTranslate from "@/components/utils/textTranslate.vue";
import GoodProductConditionsFixtureInspection from "@/components/pagePlugin/goodProductConditionsFixtureInspection.vue";
import GoodProductConditionsFixtureList from "@/components/pagePlugin/goodProductConditionsFixtureList.vue";


export default {
  name: "goodProductConditions",
  components: {GoodProductConditionsFixtureList, GoodProductConditionsFixtureInspection, TextTranslate},
  data() {
    return {
      //微小缺陷对策内容忙加载
      countermeasureContentLoading:false,

      componentKey: 0, // 用于强制刷新组件
      //—————————————————————————————————————————————————————————————————————————————————————
      //控制量检具点检明细表格measuringToolChecklist高度的变量
      measuringToolChecklistHeight:window.visualViewport.height-232,
      //控制量检具基本信息表格measuringToolsList高度的变量
      measuringToolsListHeight:window.visualViewport.height-305,
      //控制量检具校准记录表格calibrationRecord高度的变量
      calibrationRecordHeight:window.visualViewport.height-305,
      //控制工装技术条件表格fixtureTechnicalCondition高度的变量
      fixtureTechnicalConditionHeight:window.visualViewport.height-270,
      //控制工装技术条件表格fixtureList高度的变量
      fixtureListHeight:window.visualViewport.height-250,
      //控制工装点检管理高度的变量
      fixtureInspectionManagementHeight:window.visualViewport.height-390,
      //控制纠正预防表格correctAndPrevent高度的变量
      correctAndPreventHeight:window.visualViewport.height-180,
      //控制问题清单表格questionList高度的变量
      questionListHeight:window.visualViewport.height-180,
      //控制油液基本信息高度的变量
      oilListHeight:window.visualViewport.height-240,
      //控制油液点检管理高度的变量
      oilInspectionManagementHeight:window.visualViewport.height-300,
      //控制油液历史数据高度的变量
      oilHistoricalDataHeight:window.visualViewport.height-370,
      //控制微小缺陷记录高度的变量
      minorDefectRecordHeight:window.visualViewport.height-305,

      //————————————————————————————————————————————点击tree—————————————————————————————————————————
      //点击tree后默认显示哪一个表
      //点击量检具，默认展示量检具基本信息
      activeName:'measuringToolsBasicInformation',
      //点击装配工装，默认展示工装技术条件
      activeNameFixture:'fixtureTechnicalCondition',
      //点击产技工装，默认展示工装技术条件
      activeNameFixture1:'fixtureTechnicalCondition',
      //点击油液，默认展示油液基本信息
      activeNameManufacturingOil:'oilBasicInformation',
      //点击机加微小缺陷，默认展示微小缺陷记录
      activeNameMachiningMinor:'minorDefectRecord',
      //点击装配微小缺陷，默认展示微小缺陷记录
      activeNameAssemblyMinor:'minorDefectRecord',
      //点击品管特急分解，默认展示检测标准
      activeNameUrgentTeardown:'urgentTeardownStandard',

      //选择的是tree的哪一级
      selectTree:-1,
      treeNode:null,
      treeData:null,

      //—————————————————————————————————————————基本信息变量————————————————————————————————————————————
      //用户权限相关的变量
      useName:'',//用户名称
      useId:'',//用户编号
      usePower:'',//用户权限

      //弹出用到的变量
      titleMessage:'提示',
      //判断用户要删除哪个数据
      deleteDataDoe:'',

      //——————————————————————————————————————————语言切换变量———————————————————————————————————————————
      //用户登录后默认为中文
      languageS:'chinese',
      //切换语言，页面变量
      main:{
        qualityManagementSystem:'俄动力质量管理系统',
        goodProductConditions:'良品条件业务',

        description:'请先选择左侧树节点以查看内容',
        edit:'编辑',
        select:'请选择',
        selectDate:'选择日期',
        selectShift:'选择班次',
        selectDepartment:'选择责任部门',
        selectGroup:'选择分组',
        chinese:'中文',
        english:'英文',
        russian:'俄文',
        //品质管理科量检具
        basicInformation:'量检具基本信息',
        inspectionManagement: '量检具点检管理',
        calibrationManagement: '量检具校准管理',
        correctAndPrevent:'纠正预防',
        questionList:'问题清单',
        //装配车间工装
        fixtureTechnicalCondition:'工装技术条件',
        fixtureList:'工装点检台账',
        fixtureInspectionManagement:'工装点检管理',
        //制技油液
        oilBasicInformation:'油液基本信息',
        oilInspectionManagement:'油液点检管理',
        oilHistoricalData:'历史点检数据',
        oilTrendManagement:'趋势管理',
        //机加微小缺陷
        minorDefectRecord:'微小缺陷记录',
        //品管特急分解
        urgentTeardownStandard:'检测标准',
        urgentTeardownResult:'检测结果',
      },
      pageVal:{
        translate:'自动翻译',
        cancel:'取 消',
        ok:'确 定',
        submit:'提 交',
        sureToDelete:'确定删除数据吗？',
        startCheck:'请使用扫码枪扫描量检具二维码',
        startCheck1:'开始点检',
        scanPlaceholder:'请扫描二维码或手动输入编号',
        manualInput:'手动输入',
        checkInformation:'点检信息',
        inputAbnormalDescription:'请输入异常描述',
        saveResult:'保存点检结果',
        scanAgain:'重新扫描',
        scanning:'正在处理...',
        checkDialog:{
          number:'编号：',
          name:'名称：',
          name_english:'名称_英：',
          name_russian:'名称_俄：',
          inspection_frequency:'点检频次：',
          is_qualified:'是否合格：'
        },
        measuringToolsList:{
          order:'序号',
          number:'编号',
          name:'名称(中)',
          name_english:'名称(英)',
          name_russian:'名称(俄)',
          specification:'规格型号',
          is_checked:'是否点检',
          inspection_frequency:'点检频次',
          is_calibration:'是否校准',
          calibration_cycle:'校准周期',
          section:'管理部门',
          group:'分组'
        },
        measuringToolChecklist:{
          order:'序号',
          number:'编号',
          name:'名称(中)',
          name_english:'名称(英)',
          name_russian:'名称(俄)',
          inspection_frequency:'点检频次',
          is_qualified:'是否合格',
          abnormal_description:'异常描述',
          create_time:'点检日期',
          frequency:'点检频次',
          shouldCheck:'应点检',
          actualCheck:'实际点检'
        },
        calibrationRecordList:{
          calibration_result:'校准结果',
          calibration_value:'校准值',
          calibration_date:'校准日期',
          next_calibration_date:'下次校准日期',
          historical_information:'历史校准信息',
        },
        correctAndPrevent: {
          question_classification:'问题分类',
          question_source:'问题来源',
          source_classification:'来源分类',
          department:'责任部门',
          question_description:'问题描述',
          generation_time:'产生时间',
          cause_analysis:'原因分析',
          corrective_action:'整改对策',
          responsible_person:'负责人',
          completion_time:'完成时间',
          correct:'纠正',
          corrective_measure:'纠正措施(含横展)',
          preventive_measure:'预防措施'
        },
        questionList: {
          correct_person:'纠正人',
          correct_time:'纠正时间',
        },
        fixtureTechnicalCondition:{
          equipment_name:'设备名称',
          equipment_name_english:'设备名称_英',
          equipment_name_russian:'设备名称_俄',
          equipment_model:'设备型号',
          category:'类别',
          category_english:'类别_英',
          category_russian:'类别_俄',
          fixture_name:'工装名称',
          fixture_name_english:'工装名称_英',
          fixture_name_russian:'工装名称_俄',
          drawing_number:'工装图纸编号',
          engine_model:'应用机型',
          control_project:'控制项目',
          control_project_english:'控制项目_英',
          control_project_russian:'控制项目_俄',
          measurement_technique:'评价/测量技术',
          measurement_technique_english:'评价/测量技术_英',
          measurement_technique_russian:'评价/测量技术_俄',
          measurement_type:'测量类型',
          standard_value:'标准值',
          upper_tolerance:'上公差',
          lower_tolerance:'下公差',
          capacity:'容量',
          frequency:'频次',
          control_method:'控制方法',
          control_method_english:'控制方法_英',
          control_method_russian:'控制方法_俄',
          failure_mode:'失效模式',
          failure_mode_english:'失效模式_英',
          failure_mode_russian:'失效模式_俄',
          department:'责任部门',
          source:'工装来源',
          fixture_number:'工装编号',
          line:'线体',
          op:'OP/存放地点'
        },
        fixtureList:{
          workshop:'车间',
          department:'责任部门',
          equipment_name:'机床名称',
          measurement_project:'检查项目',
          measurement_standard:'检查标准',
          cycle:'周期',
        },
        fixtureCheckInformation:{
          number:'工装编号：',
          name:'工装名称：',
          check_result:'点检结果',
          check_value:'点检值',
          prepare:'请准备好扫码枪后点击“开始点检”',
          reviseTime:'修改点检时间'
        },
        oilChecklist:{
          workshop:'车间',
          op:'工序',
          oil_name:'油液名称',
          oil_name_english:'油液名称_英',
          oil_name_russian:'油液名称_俄',
          refractive_index:'折光系数',
          project:'点检项目',
          requirement:'点检要求',
          upper_limit:'上限',
          lower_limit:'下限',
          actual_value:'实测值',
          check_person:'点检人',
          check_date:'点检日期',
          check_shift:'点检班次',
          export:'导出'
        },
        oilTrendManagement:{},
        minorDefectRecord:{
          team:'班组',
          raised_by:'提出人',
          date:'日期',
          equipment_number:'设备编号',
          defect_description:'缺陷描述',
          defect_description_chinese:'缺陷描述_中',
          defect_description_english:'缺陷描述_英',
          defect_description_russian:'缺陷描述_俄',
          countermeasure_content:'对策内容',
          countermeasure_content_chinese:'对策内容_中',
          countermeasure_content_english:'对策内容_英',
          countermeasure_content_russian:'对策内容_俄',
          spare_parts_information:'备件信息',
          responsible_person:'责任人',
          completion_date:'完成日期',
          countermeasure_effectiveness:'对策有效性',
          confirmed_by:'确认人',
          closing:'是否结题',
          reporting:'是否汇报',
        },
        urgentTeardown:{
          engine_model:'机型',
          part_number:'零部件图号',
          part_name:'零部件名称',
          part_name_chinese:'零部件名称_中',
          part_name_english:'零部件名称_英',
          part_name_russian:'零部件名称_俄',
          measurement_project:'检测项目',
          measurement_project_chinese:'检测项目_中',
          measurement_project_english:'检测项目_英',
          measurement_project_russian:'检测项目_俄',
          category:'类别',
          standard_setter:'标准建立人',
          approver:'批准人',
          measurement_place:'检测地点',
          urgent_teardown_number:'特急分解编号',
          send_measurement_person:'送检人',
          engine_number:'发动机号',
          actual_value:'实测值',
          measuring_picture_person:'检测/拍照人',
          measurement_date:'检测日期',
          file_name:'图片文件名称',
          urgent_teardown_name:'特急分解名称',
          urgent_teardown_name_chinese:'特急分解名称_中',
          urgent_teardown_name_english:'特急分解名称_英',
          urgent_teardown_name_russian:'特急分解名称_俄',
          notes:'备注',
          finish:'是否完成',
          uploadPicture:'上传照片',
          uploadExcel:'上传Excel',
          upload:'上传检测结果',
          finished:'分解完成',
          sendToMeasure:'我要送检',
          measurement_project1:'送检项目：',
        }
      },

      //prop变量
      equipment_name:'equipment_name',
      category:'category',
      fixture_name:'fixture_name',
      control_project:'control_project',
      measurement_technique:'measurement_technique',
      control_method:'control_method',
      failure_mode:'failure_mode',
      name:'name',

      //——————————————————————————————————————————导航栏变量———————————————————————————————————————————
      //良品条件的导航
      projectList:[
        {
          label: '品质管理科',
          children: [
            {label: '量检具',},
            {label: '特急分解',},
          ]
        },
        {
          label: '产品技术科',
          children: [
            {label: '工装',},
          ]
        },
        {
          label: '装配车间',
          children: [
            {label: '工装',},
            {label: '微小缺陷',},
          ]
        },
        {
          label: '机加车间',
          children: [
            {label: '微小缺陷',},
          ]
        },
        {
          label: '制造技术科',
          children: [
            {label: '油液',},
          ]
        },
      ],
      projectListChinese:[
        {
          label: '品质管理科',
          children: [
            {label: '量检具',},
            {label: '特急分解',},
          ]
        },
        {
          label: '产品技术科',
          children: [
            {label: '工装',},
          ]
        },
        {
          label: '装配车间',
          children: [
            {label: '工装',},
            {label: '微小缺陷',},
          ]
        },
        {
          label: '机加车间',
          children: [
            {label: '微小缺陷',},
          ]
        },
        {
          label: '制造技术科',
          children: [
            {label: '油液',},
          ]
        },
      ],
      projectListEnglish:[
        {
          label: 'Quality Management',
          children: [
            {label: 'Measuring Tools',},
            {label: 'Urgent Teardown',},
          ]
        },
        {
          label: 'Product Technology',
          children: [
            {label: 'Fixture',},
          ]
        },
        {
          label: 'Assembly Workshop',
          children: [
            {label: 'Fixture',},
            {label: 'Minor Defect',},
          ]
        },
        {
          label: 'Machining Workshop',
          children: [
            {label: 'Minor Defect',},
          ]
        },
        {
          label: 'Manufacture Tech',
          children: [
            {label: 'Oil&Fluid',},
          ]
        },
      ],
      projectListRussian:[
        {
          label: 'Управления качеством',
          children: [
            {label: 'Измерительные',},
            {label: 'Срочный разрыв',},
          ]
        },
        {
          label: 'Технология продукции',
          children: [
            {label: 'Устройство',},
          ]
        },
        {
          label: 'Сборочная линия',
          children: [
            {label: 'Устройство',},
            {label: 'Мелкий дефект',},
          ]
        },
        {
          label: 'Обработки линия',
          children: [
            {label: 'Мелкий дефект',},
          ]
        },
        {
          label: 'Tехнологии производства',
          children: [
            {label: 'Нефть&жидкость',},
          ]
        },
      ],

      //油液点检管理中机加工序的tree
      machiningOpData: [
        {label: 'Cylinder block',
          children: [
            {label: 'OP05'},
            {label: 'OP10'},
            {label: 'OP20'},
            {label: 'OP30'},
            {label: 'OP40'},
            {label: 'OP50'},
            {label: 'OP60'},
            {label: 'OP70'},
            {label: 'OP75'},
            {label: 'OP80'},
            {label: 'OP90'},
            {label: 'OP100'},
            {label: 'OP110'},
            {label: 'OP120'},
            {label: 'OP130'},
            {label: 'OP135'},
            {label: 'OP140'},
            {label: 'OP150'},
            {label: 'OP160'},
            {label: 'OP170'},
            {label: '其他/Other/Другие'}]},
        {label: 'Cylinder head',
          children: [
            {label: 'OP05'},
            {label: 'OP10'},
            {label: 'OP20'},
            {label: 'OP20A'},
            {label: 'OP20B'},
            {label: 'OP30'},
            {label: 'OP30A'},
            {label: 'OP30B'},
            {label: 'OP40'},
            {label: 'OP60'},
            {label: 'OP70'},
            {label: 'OP80'},
            {label: 'OP90'},
            {label: 'OP100'},
            {label: 'OP105'},
            {label: 'OP110'},
            {label: 'OP120'},
            {label: 'OP130'},
            {label: 'OP140'},
            {label: 'OP150'},
            {label: 'OP160'},
            {label: 'OP170'},
            {label: 'OP180'},
            {label: 'OP190'},
            {label: 'OP200'},
            {label: '其他/Other/Другие'}]}
      ],
      defaultProps: {
        children: 'children',
        label: 'label'
      },

      //——————————————————————————————————————————量检具基本信息变量———————————————————————————————————————————
      //计量器具基本信息
      measuringToolsListData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //更新人
          sys_update_user:'',
          //逻辑删除
          sys_deleted:'',
          //自有系统的主键
          idUse:0,
          //创建时间
          establishTime:'',
          //修改时间
          updateTime:'',

          //编号
          number:'',
          //名称
          name:'',
          //名称(英)
          name_english:'',
          //名称(俄)
          name_russian:'',
          //规格型号
          specification:'',
          //是否点检
          is_checked:'',
          //点检频次
          inspection_frequency:'',
          //是否校准
          is_calibration:'',
          //校准周期
          calibration_cycle:'',
          //管理部门
          section:'',
          //分组
          group:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //机型
          engine_model:''
        }
      ],
      //计量器具基本信息表
      measuringToolsListForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //更新人
        sys_update_user:'',
        //逻辑删除
        sys_deleted:0,
        //自有系统的主键
        idUse:0,
        //创建时间
        establishTime:'',
        //修改时间
        updateTime:'',

        //编号
        number:'',
        //名称
        name:'',
        //名称(英)
        name_english:'',
        //名称(俄)
        name_russian:'',
        //规格型号
        specification:'',
        //是否点检
        is_checked:'',
        //点检频次
        inspection_frequency:'',
        //是否校准
        is_calibration:'',
        //校准周期
        calibration_cycle:'',
        //使用部门
        section:'',
        //分组
        group:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //机型
        engine_model:''
      },
      //记录用户要对表进行哪项操作，1.插入，2，编辑，3删除
      measuringToolsListDoe:0,
      //记录用户当前点击了哪一行
      measuringToolsListScope:null,
      //计量器具基本信息筛选绑定表
      filteredMeasuringToolsListData:[],

      //定义量检具基本信息中分组选择
      groupSelect:'',
      //筛选量检具基本信息
      filteredData: [],

      //——————————————————————————————————————————量检具点检管理变量———————————————————————————————————————————
      //计量器具点检信息
      measuringToolChecklistData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //编号
          number:'',
          //名称
          name:'',
          //名称(英)
          name_english:'',
          //名称(俄)
          name_russian:'',
          //规格型号
          specification:'',
          //点检频次
          inspection_frequency:'',
          //是否合格
          is_qualified:'',
          //异常描述
          abnormal_description:'',
          //基本信息id
          basicInformationId:'',
        }
      ],
      measuringToolChecklistForm: {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //编号
          number:'',
          //名称
          name:'',
          //名称(英)
          name_english:'',
          //名称(俄)
          name_russian:'',
          //规格型号
          specification:'',
          //点检频次
          inspection_frequency:'',
          //是否合格
          is_qualified:'',
          //异常描述
          abnormal_description:'',
          //基本信息id
          basicInformationId:'',
        },
      measuringToolChecklistDataScope:null,
      //未点检量检具明细
      uncheckedMeasuringTools:[
        {
          number:'',
          name:'',
          name_english:'',
          name_russian:'',
          group:''
        }
      ],
      shiftUnchecked:[],
      dayUnchecked:[],
      threeDaysUnchecked:[],
      weekUnchecked:[],
      twoWeeksUnchecked:[],
      monthUnchecked:[],
      threeMonthsUnchecked:[],
      sixMonthsUnchecked:[],
      yearUnchecked:[],

      currentNumber: '',  //用于生成二维码时记录当前行的编码
      scanCode: '',       // 存储扫描/输入的二维码内容
      scanLoading: false, // 加载状态
      scanResult: null, // 存储扫描结果

      // 存储量检具扫描后的详细信息
      scanDetails: {    // 存储扫描后的详细信息
        number: '',
        name: '',
        name_english:'',
        name_russian:'',
        inspection_frequency:'',
        is_qualified: '',
        abnormal_description: ''
      },
      keyboardHandler: null,

      //———————————————————————————————————————————量检具校准管理变量——————————————————————————————————————————
      //计量器具校准记录信息
      calibrationRecordData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //更新人
          sys_update_user:'',
          //逻辑删除
          sys_deleted:'',
          //自有编辑人
          editor:'',
          //自有创建时间
          establishTime:'',
          //自有修改时间
          updateTime:'',

          //编号
          number:'',
          //名称
          name:'',
          //名称(英)
          name_english:'',
          //名称(俄)
          name_russian:'',
          //规格型号
          specification:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //校准周期
          calibration_cycle:'',
          //校准结果
          calibration_result:'',
          //校准值
          calibration_value:'',
          //校准日期
          calibration_date:'',
          //下次校准日期
          next_calibration_date: '',
          //历史校准信息
          historical_information:'',
        }
      ],
      //计量器具校准记录表
      calibrationRecordListForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //更新人
        sys_update_user:'',
        //逻辑删除
        sys_deleted:'',
        //自有编辑人
        editor:'',
        //创建时间
        establishTime:'',
        //修改时间
        updateTime:'',

        //编号
        number:'',
        //名称
        name:'',
        //名称(英)
        name_english:'',
        //名称(俄)
        name_russian:'',
        //规格型号
        specification:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //校准周期
        calibration_cycle:'',
        //校准结果
        calibration_result:'',
        //校准值
        calibration_value:'',
        //校准日期
        calibration_date:'',
        //下次校准日期
        next_calibration_date: '',
        //历史校准信息
        historical_information:'',
      },
      //记录用户要对表进行哪项操作，1.编辑
      calibrationRecordListDoe:0,
      //记录用户当前点击了哪一行
      calibrationRecordListScope:null,
      //计量器具校准记录信息筛选绑定表
      filteredCalibrationRecordData:[],
      //筛选变量
      number:'',

      //历史校准记录
      historicalInformation:[
        {
          standard_value:'',
          upper_tolerance:'',
          lower_tolerance:'',
          calibration_result:'',
          calibration_value:'',
          calibration_date:''
        }
      ],

      currentCalibrationScope: null,
      currentCalibrationId: '',
      currentEditRow: {},
      currentFullRecord:[],

      //———————————————————————————————————————————纠正预防变量——————————————————————————————————————————
      //纠正预防信息
      correctAndPreventData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //问题分类
          question_classification:'',
          //问题来源
          question_source:'',
          //来源分类
          source_classification:'',
          //责任部门
          department:'',
          //问题描述
          question_description:'',
          //产生时间
          generation_time:'',
          //原因分析
          cause_analysis:'',
          //纠正整改对策
          a_corrective_action:'',
          //纠正负责人
          a_responsible_person:'',
          //纠正完成时间
          a_completion_time:'',
          //纠正措施整改对策
          b_corrective_action:'',
          //纠正措施负责人
          b_responsible_person:'',
          //纠正措施完成时间
          b_completion_time:'',
          //预防措施整改对策
          c_corrective_action:'',
          //预防措施负责人
          c_responsible_person:'',
          //预防措施完成时间
          c_completion_time:''
        }
      ],
      //纠正预防记录表
      correctAndPreventForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //问题分类
        question_classification:'',
        //问题来源
        question_source:'',
        //来源分类
        source_classification:'',
        //责任部门
        department:'',
        //问题描述
        question_description:'',
        //产生时间
        generation_time:'',
        //原因分析
        cause_analysis:'',
        //纠正整改对策
        a_corrective_action:'',
        //纠正负责人
        a_responsible_person:'',
        //纠正完成时间
        a_completion_time:'',
        //纠正措施整改对策
        b_corrective_action:'',
        //纠正措施负责人
        b_responsible_person:'',
        //纠正措施完成时间
        b_completion_time:'',
        //预防措施整改对策
        c_corrective_action:'',
        //预防措施负责人
        c_responsible_person:'',
        //预防措施完成时间
        c_completion_time:''
      },
      //记录用户要对表进行哪项操作，1.编辑
      correctAndPreventDoe:0,
      //记录用户当前点击了哪一行
      correctAndPreventScope:null,

      //—————————————————————————————————————————问题清单变量————————————————————————————————————————————
      //问题清单
      questionListData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //问题分类
          question_classification:'',
          //问题来源
          question_source:'',
          //来源分类
          source_classification:'',
          //责任部门
          department:'',
          //问题描述
          question_description:'',
          //产生时间
          generation_time:'',
          //纠正人
          correct_person:'',
          //纠正时间
          correct_time:'',
        }
      ],
      //纠正预防记录表
      questionListForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //问题分类
        question_classification:'',
        //问题来源
        question_source:'',
        //来源分类
        source_classification:'',
        //责任部门
        department:'',
        //问题描述
        question_description:'',
        //产生时间
        generation_time:'',
        //纠正人
        correct_person:'',
        //纠正时间
        correct_time:'',
      },
      //记录用户要对表进行哪项操作，1.编辑
      questionListDoe:0,
      //记录用户当前点击了哪一行
      questionListScope:null,

      //问题清单中问题描述详情
      questionList: {
        question_description: "",
          uncheckedMeasuringToolsNumber:[
            {number:'',
             date:'',
             isSupply:''}
          ]
        },

      //———————————————————————————————————————————工装技术条件变量——————————————————————————————————————————
      //工装技术条件
      fixtureTechnicalConditionData:[
        {
          //序号
          indexUse:'',
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //设备名称
          equipment_name:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //设备型号
          equipment_model:'',
          //类别
          category:'',
          //类别_英
          category_english:'',
          //类别_俄
          category_russian:'',
          //工装名称
          fixture_name:'',
          //工装名称_英
          fixture_name_english:'',
          //工装名称_俄
          fixture_name_russian:'',
          //工装图纸编号
          drawing_number:'',
          //应用机型
          engine_model:'',
          //控制项目
          control_project:'',
          //控制项目_英
          control_project_english:'',
          //控制项目_俄
          control_project_russian:'',
          //评价/测量技术
          measurement_technique:'',
          //评价/测量技术_英
          measurement_technique_english:'',
          //评价/测量技术_俄
          measurement_technique_russian:'',
          //测量类型
          measurement_type:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //容量
          capacity:'',
          //频次
          frequency:'',
          //控制方法
          control_method:'',
          //控制方法_英
          control_method_english:'',
          //控制方法_俄
          control_method_russian:'',
          //失效模式
          failure_mode:'',
          //失效模式_英
          failure_mode_english:'',
          //失效模式_俄
          failure_mode_russian:'',
          //责任部门
          department:'',
          //工装来源
          source:'',
          //工装编号
          fixture_number:'',
          //线体
          line:'',
          //工序/存放地点
          op:'',
          //工装台账id
          fixture_list_id:'',
        }
      ],
      //工装技术条件表
      fixtureTechnicalConditionForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //设备名称
        equipment_name:'',
        //设备名称_英
        equipment_name_english:'',
        //设备名称_俄
        equipment_name_russian:'',
        //设备型号
        equipment_model:'',
        //类别
        category:'',
        //类别_英
        category_english:'',
        //类别_俄
        category_russian:'',
        //工装名称
        fixture_name:'',
        //工装名称_英
        fixture_name_english:'',
        //工装名称_俄
        fixture_name_russian:'',
        //工装图纸编号
        drawing_number:'',
        //应用机型
        engine_model:'',
        //控制项目
        control_project:'',
        //控制项目_英
        control_project_english:'',
        //控制项目_俄
        control_project_russian:'',
        //评价/测量技术
        measurement_technique:'',
        //评价/测量技术_英
        measurement_technique_english:'',
        //评价/测量技术_俄
        measurement_technique_russian:'',
        //测量类型
        measurement_type:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //容量
        capacity:'',
        //频次
        frequency:'',
        //控制方法
        control_method:'',
        //控制方法_英
        control_method_english:'',
        //控制方法_俄
        control_method_russian:'',
        //失效模式
        failure_mode:'',
        //失效模式_英
        failure_mode_english:'',
        //失效模式_俄
        failure_mode_russian:'',
        //责任部门
        department:'',
        //工装来源
        source:'',
        //工装编号
        fixture_number:'',
        //线体
        line:'',
        //工序/存放地点
        op:'',
        //工装台账id
        fixture_list_id:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      fixtureTechnicalConditionDoe:0,
      //记录用户当前点击了哪一行
      fixtureTechnicalConditionScope:null,

      // 工装技术条件分页相关变量
      fixtureLoading: false, // 加载状态
      fixtureTechnicalConditionPagination: {
        currentPage: 1,
        pageSize: 20, // 每页显示条数
        total: 0,
      },

      //———————————————————————————————————————————工装台账变量——————————————————————————————————————————
      //工装点检台账
      fixtureListData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //部门
          department:'',
          //机床名称
          equipment_name:'',
          //线体
          line:'',
          //工序或存放地点
          op:'',
          //检查项目
          measurement_project:'',
          //图纸编号
          drawing_number:'',
          //检查标准
          measurement_standard:'',
          //测量类型
          measurement_type:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //机型
          model:'',
          //评价测量技术
          measurement_technique:'',
          //周期
          cycle:'',
          //工装编号
          fixture_number:'',
        }
      ],
      //工装点检台账
      fixtureListForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //车间
        workshop:'',
        //部门
        department:'',
        //机床名称
        equipment_name:'',
        //线体
        line:'',
        //工序或存放地点
        op:'',
        //检查项目
        measurement_project:'',
        //图纸编号
        drawing_number:'',
        //检查标准
        measurement_standard:'',
        //测量类型
        measurement_type:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //机型
        model:'',
        //评价测量技术
        measurement_technique:'',
        //周期
        cycle:'',
        //工装编号
        fixture_number:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      fixtureListDoe:0,
      //记录用户当前点击了哪一行
      fixtureListScope:null,

      //自动翻译的变量
      equipment_name_translate:{
        zh:'',en:'',ru:''
      },
      measurement_project_translate:{
        zh:'',en:'',ru:''
      },
      measurement_standard_translate:{
        zh:'',en:'',ru:''
      },
      measurement_technique_translate:{
        zh:'',en:'',ru:''
      },

      //——————————————————————————————————————————工装点检管理变量———————————————————————————————————————————
      //工装点检管理
      fixtureChecklistData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //责任部门
          department:'',
          //机床名称
          equipment_name:'',
          //线体
          line:'',
          //工序或存放地点
          op:'',
          //检查项目
          measurement_project:'',
          //图纸编号
          drawing_number:'',
          //检查标准
          measurement_standard:'',
          //测量类型
          measurement_type:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //机型
          model:'',
          //评价测量技术
          measurement_technique:'',
          //周期
          cycle:'',
          //工装编号
          fixture_number:'',
          //点检结果
          check_result:'',
          //点检值
          check_value:'',
          //异常描述
          abnormal_description:'',
          //点检日期
          check_date:'',
          //点检班次
          check_shift:'',
          //点检人
          check_person:'',
          //指导书id
          instruction_id:'',
        }
      ],
      //工装点检管理
      fixtureChecklistForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //车间
        workshop:'',
        //责任部门
        department:'',
        //机床名称
        equipment_name:'',
        //线体
        line:'',
        //工序或存放地点
        op:'',
        //检查项目
        measurement_project:'',
        //图纸编号
        drawing_number:'',
        //检查标准
        measurement_standard:'',
        //测量类型
        measurement_type:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //机型
        model:'',
        //评价测量技术
        measurement_technique:'',
        //周期
        cycle:'',
        //工装编号
        fixture_number:'',
        //点检结果
        check_result:'',
        //点检值
        check_value:'',
        //异常描述
        abnormal_description:'',
        //点检日期
        check_date:'',
        //点检班次
        check_shift:'',
        //点检人
        check_person:'',
        //指导书id
        instruction_id:'',
      },

      // 控制是否显示扫码区域
      isScanning: false,
      // 存储工装扫描后的详细信息
      scanDetailsFixture: {
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        op: '',
        fixture_list_id:''
      },

      //修改点检人的变量
      checkPerson: null,
      //修改点检日期的变量
      selectedDateTime: null, // 用于绑定日期选择器的值
      defaultTime: new Date(), // 默认时间（当前时间）

      //———————————————————————————————————————————油液基本信息变量——————————————————————————————————————————
      //油液基本信息
      oilListData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //线体
          line:'',
          //工序
          op:'',
          //机型
          model:'',
          //设备名称_中
          equipment_name_chinese:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //油液名称_中
          oil_name_chinese:'',
          //油液名称_英
          oil_name_english:'',
          //油液名称_俄
          oil_name_russian:'',
          //规格型号
          specification:'',
          //折光系数
          refractive_index:'',
          //点检项目
          project:'',
          //点检要求
          requirement:'',
          //标准值
          standard_value:'',
          //上限
          upper_limit:'',
          //下限
          lower_limit:'',
          //点检频次
          inspection_frequency:'',
        }
      ],
      //油液基本信息表
      oilListForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //车间
        workshop:'',
        //线体
        line:'',
        //工序
        op:'',
        //机型
        model:'',
        //设备名称_中
        equipment_name_chinese:'',
        //设备名称_英
        equipment_name_english:'',
        //设备名称_俄
        equipment_name_russian:'',
        //油液名称_中
        oil_name_chinese:'',
        //油液名称_英
        oil_name_english:'',
        //油液名称_俄
        oil_name_russian:'',
        //规格型号
        specification:'',
        //折光系数
        refractive_index:'',
        //点检项目
        project:'',
        //点检要求
        requirement:'',
        //标准值
        standard_value:'',
        //上限
        upper_limit:'',
        //下限
        lower_limit:'',
        //点检频次
        inspection_frequency:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      oilListDoe:0,
      //记录用户当前点击了哪一行
      oilListScope:null,

      //———————————————————————————————————————————油液点检表变量——————————————————————————————————————————
      //油液点检表
      oilChecklistData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //线体
          line:'',
          //工序
          op:'',
          //机型
          model:'',
          //设备名称_中
          equipment_name_chinese:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //油液名称_中
          oil_name_chinese:'',
          //油液名称_英
          oil_name_english:'',
          //油液名称_俄
          oil_name_russian:'',
          //规格型号
          specification:'',
          //折光系数
          refractive_index:'',
          //点检项目
          project:'',
          //点检要求
          requirement:'',
          //标准值
          standard_value:'',
          //上限
          upper_limit:'',
          //下限
          lower_limit:'',
          //点检频次
          inspection_frequency:'',
          //油液基本信息id
          oil_basic_information_id:'',
          //实测值
          actual_value:'',
          //异常描述
          abnormal_description:'',
          //点检人
          check_person:'',
          //点检日期
          check_date:'',
          //点检班次
          check_shift:'',
        }
      ],
      //油液点检表
      oilChecklistForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //车间
        workshop:'',
        //线体
        line:'',
        //工序
        op:'',
        //机型
        model:'',
        //设备名称_中
        equipment_name_chinese:'',
        //设备名称_英
        equipment_name_english:'',
        //设备名称_俄
        equipment_name_russian:'',
        //油液名称_中
        oil_name_chinese:'',
        //油液名称_英
        oil_name_english:'',
        //油液名称_俄
        oil_name_russian:'',
        //规格型号
        specification:'',
        //折光系数
        refractive_index:'',
        //点检项目
        project:'',
        //点检要求
        requirement:'',
        //标准值
        standard_value:'',
        //上限
        upper_limit:'',
        //下限
        lower_limit:'',
        //点检频次
        inspection_frequency:'',
        //油液基本信息id
        oil_basic_information_id:'',
        //实测值
        actual_value:'',
        //异常描述
        abnormal_description:'',
        //点检人
        check_person:'',
        //点检日期
        check_date:'',
        //点检班次
        check_shift:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      oilChecklistDoe:0,
      //记录用户当前点击了哪一行
      oilChecklistScope:null,

      // 当前选中的tree节点信息
      currentTreeNode: null,
      // 查询到的原始油液基本信息
      originalOilData: [],
      // 按设备分组后的油液数据
      groupedOilData: [],
      // 当前正在点检的设备索引
      currentDeviceIndex: -1,
      // 当前点检信息（全局，不重复显示）
      oilCheckInfoData: [{
        check_person: '',
        check_date: '',
        check_shift: ''
      }],

      // 点检项目的频次规则配置
      frequencyRules: {
        'Mon+Thur': {
          enabledDays: [1, 4], // 周一=1, 周四=4
          requireValue: true
        },
        '2weeks': {
          enabledDays: 'all', // 所有日期都可填写，但不强制
          requireValue: false
        },
        '1day': {
          enabledDays: 'all',
          requireValue: false
        }
        // 可以继续添加其他频次规则
      },

      //———————————————————————————————————————————油液历史数据变量——————————————————————————————————————————
      //油液历史数据表
      oilHistoricalData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //线体
          line:'',
          //工序
          op:'',
          //机型
          model:'',
          //设备名称_中
          equipment_name_chinese:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //油液名称_中
          oil_name_chinese:'',
          //油液名称_英
          oil_name_english:'',
          //油液名称_俄
          oil_name_russian:'',
          //规格型号
          specification:'',
          //折光系数
          refractive_index:'',
          //点检项目
          project:'',
          //点检要求
          requirement:'',
          //标准值
          standard_value:'',
          //上限
          upper_limit:'',
          //下限
          lower_limit:'',
          //点检频次
          inspection_frequency:'',
          //油液基本信息id
          oil_basic_information_id:'',
          //实测值
          actual_value:'',
          //异常描述
          abnormal_description:'',
          //点检人
          check_person:'',
          //点检日期
          check_date:'',
          //点检班次
          check_shift:'',
        }
      ],
      //油液历史数据表
      oilHistoricalForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //车间
        workshop:'',
        //线体
        line:'',
        //工序
        op:'',
        //机型
        model:'',
        //设备名称_中
        equipment_name_chinese:'',
        //设备名称_英
        equipment_name_english:'',
        //设备名称_俄
        equipment_name_russian:'',
        //油液名称_中
        oil_name_chinese:'',
        //油液名称_英
        oil_name_english:'',
        //油液名称_俄
        oil_name_russian:'',
        //规格型号
        specification:'',
        //折光系数
        refractive_index:'',
        //点检项目
        project:'',
        //点检要求
        requirement:'',
        //标准值
        standard_value:'',
        //上限
        upper_limit:'',
        //下限
        lower_limit:'',
        //点检频次
        inspection_frequency:'',
        //油液基本信息id
        oil_basic_information_id:'',
        //实测值
        actual_value:'',
        //异常描述
        abnormal_description:'',
        //点检人
        check_person:'',
        //点检日期
        check_date:'',
        //点检班次
        check_shift:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      oilHistoricalDoe:0,
      //记录用户当前点击了哪一行
      oilHistoricalScope:null,

      //其他的选择变量：
      oil_equipment_name:'',//设备名称
      oil_name:'',//油液名称
      project:'',//点检项目
      line:'',
      op:'',
      check_date:'',
      check_person:'',
      check_shift:'',
      filteredOilHistoricalData: [], // 筛选后的数据

      //分页查询历史数据的变量
      oilHistoricalDataPagination: {
        currentPage: 1,
        pageSize: 50, // 每页显示条数
        total: 0,
      },
      // 添加筛选状态跟踪
      isOilHistoricalDataFiltered: false,
      currentOilFilterParams: null,

      //———————————————————————————————————————————油液趋势管理变量——————————————————————————————————————————
      //趋势管理相关变量
      //油液点检表
      oilTrendlistData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //车间
          workshop:'',
          //线体
          line:'',
          //工序
          op:'',
          //机型
          model:'',
          //设备名称_中
          equipment_name_chinese:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //油液名称_中
          oil_name_chinese:'',
          //油液名称_英
          oil_name_english:'',
          //油液名称_俄
          oil_name_russian:'',
          //规格型号
          specification:'',
          //折光系数
          refractive_index:'',
          //点检项目
          project:'',
          //点检要求
          requirement:'',
          //标准值
          standard_value:'',
          //上限
          upper_limit:'',
          //下限
          lower_limit:'',
          //点检频次
          inspection_frequency:'',
          //油液基本信息id
          oil_basic_information_id:'',
          //实测值
          actual_value:'',
          //异常描述
          abnormal_description:'',
          //点检人
          check_person:'',
          //点检日期
          check_date:'',
          //点检班次
          check_shift:'',
        }
      ],
      //按钮颜色变更
      chartBackground25:'#0269fa',
      chartColor25:'white',
      chartBackground50:'',
      chartColor50:'',
      chartBackground125:'',
      chartColor125:'',
      chartBackground300:'',
      chartColor300:'',
      chartBackground500:'',
      chartColor500:'',

      //原始数据画图时记录用户选择的是多少组数据
      clickQuantity:25,

      //记录用户点击趋势管理中某一行的内容，用作改变背景颜色
      oilProjectRow:null,

      //图表的相关变量
      //折线图数据存放变量
      lineChartData:null,
      //直方图数据存放变量
      barChartData:null,
      //移动极差图数据存放变量
      movingRangeChartData:null,

      //连续六点上升/下降相关变量
      ppkResult:{},
      trendResult: {},
      continuousData:[
        {
          id: null, // 主键
          create_time: null, // 创建时间
          update_time: null, // 修改时间
          creator: '', // 编辑人
          process_status:'',//流程状态
          sys_update_user:'',//更新人
          sys_audit_user:'',//审核人
          sys_audit_time:'',//审核时间
          sys_deleted: 0, //删除标记位 (0表示未删除)
          workshop:'',//车间
          line:'',//线体
          op:'',//工序
          model:'',//机型
          equipment_name_chinese:'',//设备名称_中
          equipment_name_english:'',//设备名称_英
          equipment_name_russian:'',//设备名称_俄
          oil_name_chinese:'', //油液名称_中
          oil_name_english:'',//油液名称_英
          oil_name_russian:'', //油液名称_俄
          specification:'',//规格型号
          refractive_index:'',//折光系数
          project:'',//点检项目
          requirement:'',//点检要求
          standard_value:'',//标准值
          upper_limit:'',//上限
          lower_limit:'',//下限
          inspection_frequency:'',//点检频次
          oil_basic_information_id:'',//油液基本信息id
          actual_value:'',//实测值
          abnormal_description:'',//异常描述
          check_person:'',//点检人
          check_date:'',//点检日期
          check_shift:'',//点检班次
        }
      ],

      //———————————————————————————————————————————微小缺陷记录变量——————————————————————————————————————————
      //微小缺陷记录大表
      minorDefectRecordData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //班组
          team:'',
          //提出人
          raised_by:'',
          //日期
          date:'',
          //车间名称
          workshop:'',
          //线体名称
          line:'',
          //工序号
          op:'',
          //设备编号
          equipment_number:'',
          //缺陷描述
          defect_description:'',
          //对策内容
          countermeasure_content:'',
          //备件信息
          spare_parts_information:'',
          //责任人
          responsible_person:'',
          //完成日期
          completion_date:'',
          //对策有效性
          countermeasure_effectiveness:'',
          //确认人
          confirmed_by:'',
          //结题
          closing:'',
          //是否汇报
          reporting:'',
        }
      ],
      //微小缺陷记录数据表
      minorDefectRecordForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //班组
        team:'',
        //提出人
        raised_by:'',
        //日期
        date:'',
        //车间名称
        workshop:'',
        //线体名称
        line:'',
        //工序号
        op:'',
        //设备编号
        equipment_number:'',
        //缺陷描述
        defect_description:'',
        //对策内容
        countermeasure_content:'',
        //备件信息
        spare_parts_information:'',
        //责任人
        responsible_person:'',
        //完成日期
        completion_date:'',
        //对策有效性
        countermeasure_effectiveness:'',
        //确认人
        confirmed_by:'',
        //结题
        closing:'',
        //是否汇报
        reporting:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      minorDefectRecordDoe:0,
      //记录用户当前点击了哪一行
      minorDefectRecordScope:null,

      defect_description_chinese:'',
      defect_description_english:'',
      defect_description_russian:'',
      countermeasure_content_chinese:null,
      countermeasure_content_english:null,
      countermeasure_content_russian:null,

      //其他的选择变量：
      date:'',
      responsible_person:'',
      filteredMinorDefectRecordData: [], // 筛选后的数据

      //分页查询微小缺陷记录的变量
      minorDefectRecordPagination: {
        currentPage: 1,
        pageSize: 20, // 每页显示条数
        total: 0,
      },

      // 当前激活的tab
      pointsActiveTab: 'chinese',

      //——————————————————————————————————————特急分解检测标准变量—————————————————————————————————————
      //特急分解检测标准
      urgentTeardownStandardData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //机型
          engine_model:'',
          //零部件图号
          part_number:'',
          //零部件名称
          part_name:'',
          //检测项目
          measurement_project:'',
          //类别
          category:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //标准建立人
          standard_setter:'',
          //批准人
          approver:'',
          //检测地点
          measurement_place:'',
        }
      ],
      //特急分解检测标准
      urgentTeardownStandardForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //机型
        engine_model:'',
        //零部件图号
        part_number:'',
        //零部件名称
        part_name:'',
        //检测项目
        measurement_project:'',
        //类别
        category:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //标准建立人
        standard_setter:'',
        //批准人
        approver:'',
        //检测地点
        measurement_place:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      urgentTeardownStandardDoe:0,
      //记录用户当前点击了哪一行
      urgentTeardownStandardScope:null,

      text1:'',
      text2:'',
      text3:'',
      text4:'',
      text5:'',
      text6:'',

      //我要送检的弹窗中，选择机型
      selectEngineModel:'',
      filteredUrgentTeardownStandardData:[],

      //分页查询特急分解检测标准的变量
      urgentTeardownStandardPagination: {
        currentPage: 1,
        pageSize: 50, // 每页显示条数
        total: 0,
      },

      //——————————————————————————————————————特急分解检测结果变量—————————————————————————————————————
      //特急分解检测结果
      urgentTeardownResultData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //机型
          engine_model:'',
          //零部件图号
          part_number:'',
          //零部件名称
          part_name:'',
          //检测项目
          measurement_project:'',
          //类别
          category:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //标准建立人
          standard_setter:'',
          //批准人
          approver:'',
          //检测地点
          measurement_place:'',
          //特急分解编号
          urgent_teardown_number:'',
          //送检人
          send_measurement_person:'',
          //发动机号
          engine_number:'',
          //实测值
          actual_value:'',
          //检测_拍照人
          measuring_picture_person:'',
          //检测日期
          measurement_date:'',
          //图片文件名称
          file_name:'',
          //特急分解名称
          urgent_teardown_name:'',
          //备注
          notes:'',
          //是否完成
          finish:'',
        }
      ],
      //特急分解检测结果
      urgentTeardownResultForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //机型
        engine_model:'',
        //零部件图号
        part_number:'',
        //零部件名称
        part_name:'',
        //检测项目
        measurement_project:'',
        //类别
        category:'',
        //标准值
        standard_value:'',
        //上公差
        upper_tolerance:'',
        //下公差
        lower_tolerance:'',
        //标准建立人
        standard_setter:'',
        //批准人
        approver:'',
        //检测地点
        measurement_place:'',
        //特急分解编号
        urgent_teardown_number:'',
        //送检人
        send_measurement_person:'',
        //发动机号
        engine_number:'',
        //实测值
        actual_value:'',
        //检测_拍照人
        measuring_picture_person:'',
        //检测日期
        measurement_date:'',
        //图片文件名称
        file_name:'',
        //特急分解名称
        urgent_teardown_name:'',
        //备注
        notes:'',
        //是否完成
        finish:'',
      },
      //记录用户要对表进行哪项操作：1.插入，2，编辑，
      urgentTeardownResultDoe:0,
      //记录用户当前点击了哪一行
      urgentTeardownResultScope:null,

      //存储筛选数据的大表
      filteredUrgentTeardownResultData:[],
      //筛选框变量
      urgent_teardown_number:'',
      finish:'',

      //上传特急分解检测结果照片的变量
      imageUrl: '',

      //批量上传特急分解检测结果的变量
      urgentTeardownNumber:'',

      //分页查询特急分解检测结果的变量
      urgentTeardownResultPagination: {
        currentPage: 1,
        pageSize: 50, // 每页显示条数
        total: 0,
      },
      // 添加筛选状态跟踪
      isUrgentTeardownResultFiltered: false,
      currentFilterParams: null, // 保存当前的筛选参数
      //———————————————————————————————————————————弹窗、抽屉变量——————————————————————————————————————————
      //控制编辑计量器具基本信息的弹窗,默认关闭
      measuringToolsListDialog:false,
      //控制编辑计量器具校准记录的弹窗,默认关闭
      calibrationRecordListDialog:false,
      //控制删除数据的弹窗,默认关闭
      deleteDataDialog:false,
      //展示二维码的弹窗，默认关闭
      qrCodeDialog:false,
      //控制开始点检的提示弹窗，默认关闭
      startCheckDialog:false,
      //控制未点检量检具的弹窗，默认关闭
      uncheckedMeasuringToolsDialog:false,
      //控制历史校准记录的弹窗，默认关闭
      historicalInformationDialog:false,
      //编辑历史校准记录中某一行
      editHistoricalDialog:false,
      //控制问题清单的弹窗，默认关闭
      questionListDialog:false,
      //控制问题详情的弹窗，默认关闭
      questionDescriptionDialog:false,
      //控制量检具补点检的弹窗，默认关闭
      measuringToolsCheckSupplyDialog:false,
      //控制工装技术条件的弹窗，默认关闭
      fixtureTechnicalConditionDialog:false,
      //控制工装台账的弹窗，默认关闭
      fixtureListDialog:false,
      //控制油液基本信息的弹窗，默认关闭
      oilListDialog:false,
      //控制油液点检记录的弹窗，默认关闭
      oilChecklistDialog:false,
      //控制连续六点上升/下降的弹窗
      continuousDataDialog:false,
      //控制微小缺陷的弹窗，默认关闭
      minorDefectRecordDialog:false,
      //控制微小缺陷对策内容的弹窗，默认关闭
      countermeasureContentDialog:false,
      //控制微小缺陷对策有效性的弹窗，默认关闭
      countermeasureEffectivenessDialog:false,
      //控制特急分解检测标准的弹窗，默认关闭
      urgentTeardownStandardDialog:false,
      //控制我要送检的弹窗，默认关闭
      sendToMeasureDialog:false,
      //控制特急分解检测结果的弹窗(检测)，默认关闭
      urgentTeardownResultMeasureDialog:false,
      //控制特急分解检测结果的弹窗(拍照)，默认关闭
      urgentTeardownResultPictureDialog:false,
      //控制上传特急分检测结果的弹窗，默认关闭
      uploadUrgentTeardownResultDialog:false,
      //控制分解完成的弹窗，默认关闭
      finishUrgentTeardownResultDialog:false,

      //控制纠正预防的抽屉，默认关闭
      correctAndPreventDrawer:false,

      //—————————————————————————————————————————选择器变量————————————————————————————————————————————
      //定义日期选择
      dateSelect:'',
      //定义班次选择
      shiftSelect:'',
      //定义责任部门选择
      departmentSelect:'',

      //班次选择选项
      shiftOptions: [
        {value: '早班/morning Shift/Ранняя смена', label: '早班/morning Shift/Ранняя смена'},
        {value: '中班/middle shift/Средний класс', label: '中班/middle shift/Средний класс'},
        {value: '夜班/night shift/Ночная работа', label: '夜班/night shift/Ночная работа'}
      ],
      //是否合格的选项
      isQualifiedOptions: [
        {label:'合格/qualified/Квалифицированный', value:'合格/qualified/Квалифицированный'},
        {label:'不合格/unqualified/Не квалифицированный', value:'不合格/unqualified/Не квалифицированный'},
      ],
      //定义量检具基本信息中分组选择
      groupOptions:[
      {label:"精测/Precision Measurement/Точность измерения" , value:"精测"},
      {label:"内检/Internal inspection/Внутренняя инспекция" , value:"内检"},
      {label:"外检/Appearance Inspection/Инспекция внешнего вида" , value:"外检"},
      {label:"成检/End Product Inspection/Kонечного продукта" , value:"成检"},
    ],
      //定义点检频次、应点检、实际点检
      measuringToolCheckResult: [
        { frequency: '1shift', shouldCheck: '', actualCheck: '' },
        { frequency: '1day', shouldCheck: '', actualCheck: '' },
        { frequency: '3days', shouldCheck: '', actualCheck: '' },
        { frequency: '1week', shouldCheck: '', actualCheck: '' },
        { frequency: '2weeks', shouldCheck: '', actualCheck: '' },
        { frequency: '1month', shouldCheck: '', actualCheck: '' },
        { frequency: '3months', shouldCheck: '', actualCheck: '' },
        { frequency: '6months', shouldCheck: '', actualCheck: '' },
        { frequency: '1year', shouldCheck: '', actualCheck: '' }
      ],
      //车间/科室的选项
      workshopOptions:[
        {label:'机加/Machining Workshop/Обработки линия', value:'机加/Machining Workshop/Обработки линия'},
        {label:'装配/Assembly Workshop/Сборочная линия', value:'装配/Assembly Workshop/Сборочная линия'},
        {label:'产技/Product Technology/Технология продукции', value:'产技/Product Technology/Технология продукции'},
        {label:'品管/Quality Management/Управления качеством', value:'品管/Quality Management/Управления качеством'},
        {label:'制技/Manufacture Tech/Tехнологии производства', value:'制技/Manufacture Tech/Tехнологии производства'},
        {label:'物流/Logistics Department/Отдел логистики', value:'物流/Logistics Department/Отдел логистики'},
        {label:'设备/Maintenance Utility/Oбслуживания оборудования', value:'设备/Maintenance Utility/Oбслуживания оборудования'},
      ],
      //车间选项-机加/装配
      workshopOptions1:[
        {label:'机加/Machining Workshop/Обработки линия', value:'机加/Machining Workshop/Обработки линия'},
        {label:'装配/Assembly Workshop/Сборочная линия', value:'装配/Assembly Workshop/Сборочная линия'},
      ],
      //问题分类的选项
      questionClassificationOptions:[
        {label:'流程问题', value:'流程问题'},
        {label:'执行问题', value:'执行问题'},
        {label:'职责问题', value:'职责问题'},
        {label:'接口问题', value:'接口问题'},
        {label:'人员问题', value:'人员问题'},
      ],
      //问题来源的选项
      questionSourceOptions:[
        {label:'良品条件', value:'良品条件'},
      ],
      //来源分类的选项
      sourceClassificationOptions:[
        {label:'品管-量检具', value:'品管-量检具'},
      ],
      //线体选项
      lineOptions:[],
      //线体选项(装配+机加)
      lineOptions1:[
        {label:'装配线/Assembly Line/Сборочная линия', value:'装配线/Assembly Line/Сборочная линия'},
        {label:'缸体线/Cylinder block line/ линия блока цилиндров', value:'缸体线/Cylinder block line/ линия блока цилиндров'},
        {label:'缸盖线/Cylinder head line/линия головки блока цилиндров', value:'缸盖线/Cylinder head line/линия головки блока цилиндров'},
      ],
      //工序选项
      opOptions:[],
      //班组选项
      teamOptions:[],
      //工装图纸编号下拉选(在工装技术条件中组合好的)
      drawingNumberOptions:[
        {label: '', value:'',}
      ],
      //零部件组合选项
      partsListOptions:[]
    }
  },

  //—————————————————————————————————————————————————————————————————————————————————————
  //—————————————————————————————————————————————————————————————————————————————————————
  watch: {
    //监视shiftSelect变量
    // eslint-disable-next-line no-unused-vars
    shiftSelect(newVal,oldVal){
      //给没有点检数据记录的值清零
      this.shiftUnchecked=[]
      this.dayUnchecked=[]
      this.threeDaysUnchecked=[]
      this.weekUnchecked=[]
      this.twoWeeksUnchecked=[]
      this.monthUnchecked=[]
      this.threeMonthsUnchecked=[]
      this.sixMonthsUnchecked=[]
      this.yearUnchecked=[]
      //如果日期选择不为空时
      if (this.dateSelect!=='' && this.dateSelect!==null && this.dateSelect!==undefined){
        let timeTemp=[]
        //当班次选择早班时，转化为北京时间
        if (this.shiftSelect==='早班/morning Shift/Ранняя смена'){
          timeTemp=[this.dateSelect+' 13:00:00',this.dateSelect+' 22:30:00']
        }
        else if (this.shiftSelect==='中班/middle shift/Средний класс'){
          // 1. 将日期字符串转换为Date对象
          const date = new Date(this.dateSelect);

          // 2. 获取下一天的日期
          const nextDay = new Date(date);
          nextDay.setDate(date.getDate() + 1);

          // 3. 将下一天日期转换回字符串格式
          const nextDayStr = nextDay.toISOString().split('T')[0]
          timeTemp=[this.dateSelect+' 22:00:00',nextDayStr+' 07:30:00']
        }
        else if (this.shiftSelect==='夜班/night shift/Ночная работа'){
          // 1. 将日期字符串转换为Date对象
          const date = new Date(this.dateSelect);

          // 2. 获取下一天的日期
          const nextDay = new Date(date);
          nextDay.setDate(date.getDate() + 1);

          // 3. 将下一天日期转换回字符串格式
          const nextDayStr = nextDay.toISOString().split('T')[0]
          timeTemp=[nextDayStr+' 07:00:00',nextDayStr+' 13:30:00']
        }
        if(timeTemp.length===2){
          this.$request.post('/queryMeasuringToolChecklistOneFieldScopeGoodProduct',{
            fieldName:'create_time',
            minVal:timeTemp[0],
            maxVal:timeTemp[1],
          }).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
              this.measuringToolChecklistData=result.data
              //筛选点检频次
              for (let i = 0; i < this.measuringToolChecklistData.length; i++) {
                const index = this.measuringToolsListData.findIndex(item =>String(item.number) === String(this.measuringToolChecklistData[i].number))
                if(index!==-1){
                  this.measuringToolChecklistData[i].inspection_frequency=this.measuringToolsListData[index].inspection_frequency
                }
              }
            }
          })
        }

        //计算应点检和实际点检
        //循坏，输出各频次下对应的是否点检为“yes”的数量
        //在 for 循环中，i 从 0 开始递增，遍历 this.measuringToolCheckResult 数组
        for (let i = 0; i < this.measuringToolCheckResult.length; i++) {
          //筛选出应该点检的数量，temp(数组)即为应该点检的数量
          //[i]为数组索引，用于存储应点检数量，实际点检数量
          let temp=this.filterMeasuringToolListIsChecked('yes',this.measuringToolCheckResult[i].frequency)
          let temp1=[]
          //将应点检数量设置为筛选结果的长度
          this.measuringToolCheckResult[i].shouldCheck=temp.length
          //输出实际点检值
          //如果应点检为0，那么实际点检就为0
          if (this.measuringToolCheckResult[i].shouldCheck===0){
            this.measuringToolCheckResult[i].actualCheck=0
          }
          //如果应点检不为0，输出实际点检的数量
          else {
            //timeTemp 是一个时间范围数组，用于存储查询点检记录的时间区间（开始时间和结束时间）。
            //它的格式通常是：[开始时间, 结束时间]
            timeTemp=[]
            //如果班次选择及日期选择不为空，计算实际点检数
            if (this.shiftSelect!=='' && this.shiftSelect!==undefined && this.shiftSelect!==null){
              if (this.dateSelect!=='' && this.dateSelect!==undefined && this.dateSelect!==null){
                //如果点检频次为一个班次，则要判断所选班次为早、中、晚班
                if (this.measuringToolCheckResult[i].frequency==='1shift'){
                  if (this.shiftSelect==='早班/morning Shift/Ранняя смена'){
                    timeTemp=[this.dateSelect+' 13:00:00',this.dateSelect+' 22:30:00']
                  }
                  else if (this.shiftSelect==='中班/middle shift/Средний класс'){
                    // 1. 将日期字符串转换为Date对象
                    const date = new Date(this.dateSelect);
                    // 2. 获取下一天的日期
                    const nextDay = new Date(date);
                    nextDay.setDate(date.getDate() + 1);
                    // 3. 将下一天日期转换回字符串格式
                    const nextDayStr = nextDay.toISOString().split('T')[0]
                    timeTemp=[this.dateSelect+' 22:00:00',nextDayStr+' 07:30:00']
                  }
                  else if (this.shiftSelect==='夜班/night shift/Ночная работа'){
                    // 1. 将日期字符串转换为Date对象
                    const date = new Date(this.dateSelect);
                    // 2. 获取下一天的日期
                    const nextDay = new Date(date);
                    nextDay.setDate(date.getDate() + 1);
                    // 3. 将下一天日期转换回字符串格式
                    const nextDayStr = nextDay.toISOString().split('T')[0]
                    timeTemp=[nextDayStr+' 07:00:00',nextDayStr+' 13:30:00']
                  }
                }
                else if(this.measuringToolCheckResult[i].frequency==='1day'){
                  timeTemp=this.subtractDays(this.dateSelect,1)
                }
                else if (this.measuringToolCheckResult[i].frequency==='3days'){
                  timeTemp=this.subtractDays(this.dateSelect,4)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1week'){
                  timeTemp=this.subtractDays(this.dateSelect,8)
                }
                else if (this.measuringToolCheckResult[i].frequency==='2weeks'){
                  timeTemp=this.subtractDays(this.dateSelect,15)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1month'){
                  //因月份涉及大小月，使用date-fns库获取当月天数并计算时间范围
                  let date = parseISO(this.dateSelect);
                  let dayNmb=getDaysInMonth(date)
                  timeTemp=this.subtractDays(this.dateSelect,dayNmb)
                }
                //处理季度、半年和年度点检的情况，计算相应月份的天数并获取时间范围
                else if (this.measuringToolCheckResult[i].frequency==='3months'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,3)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
                else if (this.measuringToolCheckResult[i].frequency==='6months'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,6)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1year'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,12)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
              }
            }
            //检查时间范围是否正确，若不正确，则提示错误
            if (timeTemp.length!==2){
              this.$message.error('应点检数量计算错误，请联系管理员')
            }
            //若时间范围正确
            else {
              //向后端发送请求查询该时间范围内的实际点检记录
              this.$request.post('/queryMeasuringToolChecklistOneFieldScopeGoodProduct',{
                fieldName:'create_time',
                minVal:timeTemp[0],
                maxVal:timeTemp[1],
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    }else {
                      //将实际点检数设置为查询结果的数据长度
                      temp1=result.data
                      this.measuringToolCheckResult[i].actualCheck=0
                      for (let j = 0; j < temp.length; j++) {
                        let unchecked=0
                        for (let k = 0; k <temp1.length ; k++) {
                          if (temp[j].number===temp1[k].number){
                            this.measuringToolCheckResult[i].actualCheck=this.measuringToolCheckResult[i].actualCheck+1
                            unchecked=1
                            break
                          }
                        }
                        //当有未点检项时，将未点检的明细输出给j行
                        if (unchecked===0){
                          if (this.measuringToolCheckResult[i].frequency==='1shift'){
                            this.shiftUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='1day'){
                            this.dayUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='3days'){
                            this.threeDaysUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='1week'){
                            this.weekUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='2weeks'){
                            this.twoWeeksUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='1month'){
                            this.monthUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='3months'){
                            this.threeMonthsUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='6months'){
                            this.sixMonthsUnchecked.push(temp[j])
                          }
                          if (this.measuringToolCheckResult[i].frequency==='1year'){
                            this.yearUnchecked.push(temp[j])
                          }
                        }
                      }
                    }
                  })
            }
          }
        }
      }
    },
    //监视dateSelect变量
    // eslint-disable-next-line no-unused-vars
    dateSelect(newVal,oldVal){
      //给没有点检数据记录的值清零
      this.shiftUnchecked=[]
      this.dayUnchecked=[]
      this.threeDaysUnchecked=[]
      this.weekUnchecked=[]
      this.twoWeeksUnchecked=[]
      this.monthUnchecked=[]
      this.threeMonthsUnchecked=[]
      this.sixMonthsUnchecked=[]
      this.yearUnchecked=[]
      let timeTemp=[]
      if (this.shiftSelect==='早班/morning Shift/Ранняя смена'){
        timeTemp=[this.dateSelect+' 13:00:00',this.dateSelect+' 22:30:00']
      }
      else if (this.shiftSelect==='中班/middle shift/Средний класс'){
        // 1. 将日期字符串转换为Date对象
        const date = new Date(this.dateSelect);

        // 2. 获取下一天的日期
        const nextDay = new Date(date);
        nextDay.setDate(date.getDate() + 1);

        // 3. 将下一天日期转换回字符串格式
        const nextDayStr = nextDay.toISOString().split('T')[0]
        timeTemp=[this.dateSelect+' 22:00:00',nextDayStr+' 07:30:00']
      }
      else if (this.shiftSelect==='夜班/night shift/Ночная работа'){
        // 1. 将日期字符串转换为Date对象
        const date = new Date(this.dateSelect);

        // 2. 获取下一天的日期
        const nextDay = new Date(date);
        nextDay.setDate(date.getDate() + 1);

        // 3. 将下一天日期转换回字符串格式
        const nextDayStr = nextDay.toISOString().split('T')[0]
        timeTemp=[nextDayStr+' 07:00:00',nextDayStr+' 13:30:00']
      }
      if(timeTemp.length===2){
        this.$request.post('/queryMeasuringToolChecklistOneFieldScopeGoodProduct',{
          fieldName:'create_time',
          minVal:timeTemp[0],
          maxVal:timeTemp[1],
        })
            .then(result=>{
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }else {
            this.measuringToolChecklistData=result.data
            //筛选点检频次
            for (let i = 0; i < this.measuringToolChecklistData.length; i++) {
              const index = this.measuringToolsListData.findIndex(item =>String(item.number) === String(this.measuringToolChecklistData[i].number))
              if(index!==-1){
                this.measuringToolChecklistData[i].inspection_frequency=this.measuringToolsListData[index].inspection_frequency
              }
            }
          }
        })
      }


      //计算应点检和实际点检
      //循坏，输出各频次下对应的是否点检为“yes”的数量
      //在 for 循环中，i 从 0 开始递增，遍历 this.measuringToolCheckResult 数组
      for (let i = 0; i < this.measuringToolCheckResult.length; i++) {
        //筛选出应该点检的数量，temp(数组)即为应该点检的数量
        //[i]为数组索引，用于存储应点检数量，实际点检数量
        let temp=this.filterMeasuringToolListIsChecked('yes',this.measuringToolCheckResult[i].frequency)
        let temp1=[]
        //将应点检数量设置为筛选结果的长度
        this.measuringToolCheckResult[i].shouldCheck=temp.length
        //输出实际点检值
        //如果应点检为0，那么实际点检就为0
        if (this.measuringToolCheckResult[i].shouldCheck===0){
          this.measuringToolCheckResult[i].actualCheck=0
        }
        //如果应点检不为0，输出实际点检的数量
        else {
          //timeTemp 是一个时间范围数组，用于存储查询点检记录的时间区间（开始时间和结束时间）。
          //它的格式通常是：[开始时间, 结束时间]
          timeTemp=[]
          //如果班次选择及日期选择不为空，计算实际点检数
          if (this.shiftSelect!=='' && this.shiftSelect!==undefined && this.shiftSelect!==null){
            if (this.dateSelect!=='' && this.dateSelect!==undefined && this.dateSelect!==null){
              //如果点检频次为一个班次，则要判断所选班次为早、中、晚班
              if (this.measuringToolCheckResult[i].frequency==='1shift'){
                if (this.shiftSelect==='早班/morning Shift/Ранняя смена'){
                  timeTemp=[this.dateSelect+' 13:00:00',this.dateSelect+' 22:30:00']
                }
                else if (this.shiftSelect==='中班/middle shift/Средний класс'){
                  // 1. 将日期字符串转换为Date对象
                  const date = new Date(this.dateSelect);
                  // 2. 获取下一天的日期
                  const nextDay = new Date(date);
                  nextDay.setDate(date.getDate() + 1);
                  // 3. 将下一天日期转换回字符串格式
                  const nextDayStr = nextDay.toISOString().split('T')[0]
                  timeTemp=[this.dateSelect+' 22:00:00',nextDayStr+' 07:00:00']
                }
                else if (this.shiftSelect==='夜班/night shift/Ночная работа'){
                  // 1. 将日期字符串转换为Date对象
                  const date = new Date(this.dateSelect);
                  // 2. 获取下一天的日期
                  const nextDay = new Date(date);
                  nextDay.setDate(date.getDate() + 1);
                  // 3. 将下一天日期转换回字符串格式
                  const nextDayStr = nextDay.toISOString().split('T')[0]
                  timeTemp=[nextDayStr+' 07:00:00',nextDayStr+' 13:30:00']
                }
              }
              else if(this.measuringToolCheckResult[i].frequency==='1day'){
                timeTemp=this.subtractDays(this.dateSelect,1)
              }
              else if (this.measuringToolCheckResult[i].frequency==='3days'){
                timeTemp=this.subtractDays(this.dateSelect,4)
              }
              else if (this.measuringToolCheckResult[i].frequency==='1week'){
                timeTemp=this.subtractDays(this.dateSelect,8)
              }
              else if (this.measuringToolCheckResult[i].frequency==='2weeks'){
                timeTemp=this.subtractDays(this.dateSelect,15)
              }
              else if (this.measuringToolCheckResult[i].frequency==='1month'){
                //因月份涉及大小月，使用date-fns库获取当月天数并计算时间范围
                let date = parseISO(this.dateSelect);
                let dayNmb=getDaysInMonth(date)
                timeTemp=this.subtractDays(this.dateSelect,dayNmb)
              }
              //处理季度、半年和年度点检的情况，计算相应月份的天数并获取时间范围
              else if (this.measuringToolCheckResult[i].frequency==='3months'){
                let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,3)
                timeTemp=this.subtractDays(this.dateSelect,dayNumber)
              }
              else if (this.measuringToolCheckResult[i].frequency==='6months'){
                let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,6)
                timeTemp=this.subtractDays(this.dateSelect,dayNumber)
              }
              else if (this.measuringToolCheckResult[i].frequency==='1year'){
                let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,12)
                timeTemp=this.subtractDays(this.dateSelect,dayNumber)
              }
            }
          }
          //检查时间范围是否正确，若不正确，则提示错误
          if (timeTemp.length!==2){
            this.$message.error('应点检数量计算错误，请联系管理员')
          }
          //若时间范围正确
          else {
            //向后端发送请求查询该时间范围内的实际点检记录
            this.$request.post('/queryMeasuringToolChecklistOneFieldScopeGoodProduct',{
              fieldName:'create_time',
              minVal:timeTemp[0],
              maxVal:timeTemp[1],
            })
                .then(result=>{
                  if (result.code === 401) {
                    this.$router.push('UserLogin')
                    alert("您未登录，请登录")
                  }else {
                    //将实际点检数设置为查询结果的数据长度
                    temp1=result.data
                    this.measuringToolCheckResult[i].actualCheck=0
                    for (let j = 0; j < temp.length; j++) {
                      let unchecked=0
                      for (let k = 0; k <temp1.length ; k++) {
                        if (temp[j].number===temp1[k].number){
                          this.measuringToolCheckResult[i].actualCheck=this.measuringToolCheckResult[i].actualCheck+1
                          unchecked=1
                          break
                        }
                      }
                      //当有未点检项时，将未点检的明细输出给j行
                      if (unchecked===0){
                        if (this.measuringToolCheckResult[i].frequency==='1shift'){
                          this.shiftUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='1day'){
                          this.dayUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='3days'){
                          this.threeDaysUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='1week'){
                          this.weekUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='2weeks'){
                          this.twoWeeksUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='1month'){
                          this.monthUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='3months'){
                          this.threeMonthsUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='6months'){
                          this.sixMonthsUnchecked.push(temp[j])
                        }
                        if (this.measuringToolCheckResult[i].frequency==='1year'){
                          this.yearUnchecked.push(temp[j])
                        }
                      }
                    }
                  }
                })
          }
        }
      }
    },
    // 监听弹窗打开，每次打开时重置状态
    startCheckDialog(newVal) {
      if (newVal) {
        this.resetScan();
      }
    },
    //切换装配/机加车间时出现对应的线体及工序(工装台账)
    'fixtureListForm.workshop'(newData) {
      //上层下拉菜单变更后，后续的下拉菜单内的内容清空
      if (this.fixtureListDoe === 1) {
        this.fixtureListForm.line = ''
        this.fixtureListForm.op = ''
      }
      this.lineOptions = []
      this.opOptions = []
      //控制下拉菜单选择器，如果第一个选择为装配车间，线体和工序筛选仅剩对应选项。
      if (newData === '装配/Assembly Workshop/Сборочная линия') {
        this.lineOptions = [
          {
            value: '总成线/Assembly line/сборочная линия',
            label: '总成线/Assembly line/сборочная линия'
          },
          {
            value: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров',
            label: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
          },
          {
            value: '热试线/Hot test line/Тепловая линия',
            label: '热试线/Hot test line/Тепловая линия'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
        ]
        this.opOptions = [
          {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30-1', label: 'OP30-1'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP155', label: 'OP155'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          }, {
            value: 'OP210', label: 'OP210'
          }, {
            value: 'OP220', label: 'OP220'
          }, {
            value: 'OP230', label: 'OP230'
          }, {
            value: 'OP240', label: 'OP240'
          }, {
            value: 'OP240-1', label: 'OP240-1'
          }, {
            value: 'OP250', label: 'OP250'
          }, {
            value: 'OP260', label: 'OP260'
          }, {
            value: 'OP270', label: 'OP270'
          }, {
            value: 'OP275', label: 'OP275'
          }, {
            value: 'OP280-1', label: 'OP280-1'
          }, {
            value: 'OP280-2', label: 'OP280-2'
          }, {
            value: 'OP280-3', label: 'OP280-3'
          }, {
            value: 'OP280-4', label: 'OP280-4'
          }, {
            value: 'OP280-5', label: 'OP280-5'
          }, {
            value: 'OP290', label: 'OP290'
          }, {
            value: 'OP300', label: 'OP300'
          }, {
            value: 'OP310', label: 'OP310'
          }, {
            value: 'OP320', label: 'OP320'
          }, {
            value: 'OP330', label: 'OP330'
          }, {
            value: 'OP340', label: 'OP340'
          }, {
            value: 'OP350-1', label: 'OP350-1'
          }, {
            value: 'OP350', label: 'OP350'
          }, {
            value: 'OP360', label: 'OP360'
          }, {
            value: 'OP370', label: 'OP370'
          }, {
            value: 'OP380', label: 'OP380'
          }, {
            value: 'OP390-1', label: 'OP390-1'
          }, {
            value: 'OP390-2', label: 'OP390-2'
          }, {
            value: 'OP390', label: 'OP390'
          }, {
            value: 'OP400', label: 'OP400'
          }, {
            value: 'OP410-1', label: 'OP410-1'
          }, {
            value: 'OP410', label: 'OP410'
          }, {
            value: 'OP420', label: 'OP420'
          }, {
            value: 'OP430', label: 'OP430'
          }, {
            value: 'OP440-1', label: 'OP440-1'
          }, {
            value: 'OP440', label: 'OP440'
          }, {
            value: 'OP450', label: 'OP450'
          }, {
            value: 'OP460', label: 'OP460'
          }, {
            value: 'OP470', label: 'OP470'
          }, {
            value: 'OP480', label: 'OP480'
          }, {
            value: 'OP490', label: 'OP490'
          }, {
            value: 'OP500', label: 'OP500'
          }, {
            value: 'OP510', label: 'OP510'
          }, {
            value: 'OPHL10', label: 'OPHL10'
          }, {
            value: 'OPHL20', label: 'OPHL20'
          }, {
            value: 'OPHL30', label: 'OPHL30'
          }, {
            value: 'OPGG10', label: 'OPGG10'
          }, {
            value: 'OPGG20', label: 'OPGG20'
          }, {
            value: 'OPGG30', label: 'OPGG30'
          }, {
            value: 'OPGG40', label: 'OPGG40'
          }, {
            value: 'OPGG45', label: 'OPGG45'
          }, {
            value: 'OPGG50', label: 'OPGG50'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
      }
      else if (newData === '机加/Machining Workshop/Обработки линия') {
        this.lineOptions = [
          {
            value: '缸体线/Cylinder block line/ линия блока цилиндров',
            label: '缸体线/Cylinder block line/ линия блока цилиндров'
          },
          {
            value: '缸盖线/Cylinder head line/линия головки блока цилиндров',
            label: '缸盖线/Cylinder head line/линия головки блока цилиндров'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
          ]
        //机加车间线体的工序清单。
        this.opOptions = [
          {
            value: 'OP05', label: 'OP05'
          }, {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30A', label: 'OP30A'
          }, {
            value: 'OP30B', label: 'OP30B'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP135', label: 'OP135'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
      }
      else if (newData === '产技/Quality Technology/Tехнологий качества') {
        this.lineOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
        //机加车间线体的工序清单。
        this.opOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
      }
      else if (newData === '品管/Quality Management/Управления качеством') {
        this.lineOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
        //机加车间线体的工序清单。
        this.opOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
      }
      else if (newData === '制技/Manufacture Tech/Tехнологии производства') {
        this.lineOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
        //机加车间线体的工序清单。
        this.opOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
      }
      else if (newData === '物流/Logistics Department/Отдел логистики') {
        this.lineOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
        //机加车间线体的工序清单。
        this.opOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
      }
      else if (newData === '设备/Maintenance Utility/Oбслуживания оборудования') {
        this.lineOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
        //机加车间线体的工序清单。
        this.opOptions = [
          {value: '其他/Other/Другие', label: '其他/Other/Другие'}]
      }
    },
    //切换装配/机加车间时出现对应的线体及工序(油液)
    'oilListForm.workshop'(newData) {
      //上层下拉菜单变更后，后续的下拉菜单内的内容清空
      if (this.oilListDoe === 1) {
        this.oilListForm.line = ''
        this.oilListForm.op = ''
      }
      this.lineOptions = []
      this.opOptions = []
      //控制下拉菜单选择器，如果第一个选择为装配车间，线体和工序筛选仅剩对应选项。
      if (newData === '装配/Assembly Workshop/Сборочная линия') {
        this.lineOptions = [
          {
            value: '总成线/Assembly line/сборочная линия',
            label: '总成线/Assembly line/сборочная линия'
          },
          {
            value: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров',
            label: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
          },
          {
            value: '热试线/Hot test line/Тепловая линия',
            label: '热试线/Hot test line/Тепловая линия'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
        ]
        this.opOptions = [
          {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30-1', label: 'OP30-1'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP155', label: 'OP155'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          }, {
            value: 'OP210', label: 'OP210'
          }, {
            value: 'OP220', label: 'OP220'
          }, {
            value: 'OP230', label: 'OP230'
          }, {
            value: 'OP240', label: 'OP240'
          }, {
            value: 'OP240-1', label: 'OP240-1'
          }, {
            value: 'OP250', label: 'OP250'
          }, {
            value: 'OP260', label: 'OP260'
          }, {
            value: 'OP270', label: 'OP270'
          }, {
            value: 'OP275', label: 'OP275'
          }, {
            value: 'OP280-1', label: 'OP280-1'
          }, {
            value: 'OP280-2', label: 'OP280-2'
          }, {
            value: 'OP280-3', label: 'OP280-3'
          }, {
            value: 'OP280-4', label: 'OP280-4'
          }, {
            value: 'OP280-5', label: 'OP280-5'
          }, {
            value: 'OP290', label: 'OP290'
          }, {
            value: 'OP300', label: 'OP300'
          }, {
            value: 'OP310', label: 'OP310'
          }, {
            value: 'OP320', label: 'OP320'
          }, {
            value: 'OP330', label: 'OP330'
          }, {
            value: 'OP340', label: 'OP340'
          }, {
            value: 'OP350-1', label: 'OP350-1'
          }, {
            value: 'OP350', label: 'OP350'
          }, {
            value: 'OP360', label: 'OP360'
          }, {
            value: 'OP370', label: 'OP370'
          }, {
            value: 'OP380', label: 'OP380'
          }, {
            value: 'OP390-1', label: 'OP390-1'
          }, {
            value: 'OP390-2', label: 'OP390-2'
          }, {
            value: 'OP390', label: 'OP390'
          }, {
            value: 'OP400', label: 'OP400'
          }, {
            value: 'OP410-1', label: 'OP410-1'
          }, {
            value: 'OP410', label: 'OP410'
          }, {
            value: 'OP420', label: 'OP420'
          }, {
            value: 'OP430', label: 'OP430'
          }, {
            value: 'OP440-1', label: 'OP440-1'
          }, {
            value: 'OP440', label: 'OP440'
          }, {
            value: 'OP450', label: 'OP450'
          }, {
            value: 'OP460', label: 'OP460'
          }, {
            value: 'OP470', label: 'OP470'
          }, {
            value: 'OP480', label: 'OP480'
          }, {
            value: 'OP490', label: 'OP490'
          }, {
            value: 'OP500', label: 'OP500'
          }, {
            value: 'OP510', label: 'OP510'
          }, {
            value: 'OPHL10', label: 'OPHL10'
          }, {
            value: 'OPHL20', label: 'OPHL20'
          }, {
            value: 'OPHL30', label: 'OPHL30'
          }, {
            value: 'OPGG10', label: 'OPGG10'
          }, {
            value: 'OPGG20', label: 'OPGG20'
          }, {
            value: 'OPGG30', label: 'OPGG30'
          }, {
            value: 'OPGG40', label: 'OPGG40'
          }, {
            value: 'OPGG45', label: 'OPGG45'
          }, {
            value: 'OPGG50', label: 'OPGG50'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
      }
      else if (newData === '机加/Machining Workshop/Обработки линия') {
        this.lineOptions = [
          {
            value: '缸体线/Cylinder block line/линия блока цилиндров',
            label: '缸体线/Cylinder block line/линия блока цилиндров'
          },
          {
            value: '缸盖线/Cylinder head line/линия головки блока цилиндров',
            label: '缸盖线/Cylinder head line/линия головки блока цилиндров'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
        ]
        //机加车间线体的工序清单。
        this.opOptions = [
          {
            value: 'OP05', label: 'OP05'
          }, {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP20A', label: 'OP20A'
          }, {
            value: 'OP20B', label: 'OP20B'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30A', label: 'OP30A'
          }, {
            value: 'OP30B', label: 'OP30B'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP75', label: 'OP75'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP135', label: 'OP135'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
      }
    },
    //切换装配/机加车间时出现对应的线体及工序(微小缺陷)
    'minorDefectRecordForm.workshop'(newData) {
      //上层下拉菜单变更后，后续的下拉菜单内的内容清空
      if (this.minorDefectRecordDoe === 1) {
        this.minorDefectRecordForm.line = ''
        this.minorDefectRecordForm.op = ''
        this.minorDefectRecordForm.team = ''
      }
      this.lineOptions = []
      this.opOptions = []
      this.teamOptions = []
      //控制下拉菜单选择器，如果第一个选择为装配车间，线体和工序筛选仅剩对应选项。
      if (newData === '装配/Assembly Workshop/Сборочная линия') {
        this.lineOptions = [
          {
            value: '总成线/Assembly line/сборочная линия',
            label: '总成线/Assembly line/сборочная линия'
          },
          {
            value: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров',
            label: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
          },
          {
            value: '热试线/Hot test line/Тепловая линия',
            label: '热试线/Hot test line/Тепловая линия'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
        ]
        this.opOptions = [
          {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30-1', label: 'OP30-1'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP155', label: 'OP155'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          }, {
            value: 'OP210', label: 'OP210'
          }, {
            value: 'OP220', label: 'OP220'
          }, {
            value: 'OP230', label: 'OP230'
          }, {
            value: 'OP240', label: 'OP240'
          }, {
            value: 'OP240-1', label: 'OP240-1'
          }, {
            value: 'OP250', label: 'OP250'
          }, {
            value: 'OP260', label: 'OP260'
          }, {
            value: 'OP270', label: 'OP270'
          }, {
            value: 'OP275', label: 'OP275'
          }, {
            value: 'OP280-1', label: 'OP280-1'
          }, {
            value: 'OP280-2', label: 'OP280-2'
          }, {
            value: 'OP280-3', label: 'OP280-3'
          }, {
            value: 'OP280-4', label: 'OP280-4'
          }, {
            value: 'OP280-5', label: 'OP280-5'
          }, {
            value: 'OP290', label: 'OP290'
          }, {
            value: 'OP300', label: 'OP300'
          }, {
            value: 'OP310', label: 'OP310'
          }, {
            value: 'OP320', label: 'OP320'
          }, {
            value: 'OP330', label: 'OP330'
          }, {
            value: 'OP340', label: 'OP340'
          }, {
            value: 'OP350-1', label: 'OP350-1'
          }, {
            value: 'OP350', label: 'OP350'
          }, {
            value: 'OP360', label: 'OP360'
          }, {
            value: 'OP370', label: 'OP370'
          }, {
            value: 'OP380', label: 'OP380'
          }, {
            value: 'OP390-1', label: 'OP390-1'
          }, {
            value: 'OP390-2', label: 'OP390-2'
          }, {
            value: 'OP390', label: 'OP390'
          }, {
            value: 'OP400', label: 'OP400'
          }, {
            value: 'OP410-1', label: 'OP410-1'
          }, {
            value: 'OP410', label: 'OP410'
          }, {
            value: 'OP420', label: 'OP420'
          }, {
            value: 'OP430', label: 'OP430'
          }, {
            value: 'OP440-1', label: 'OP440-1'
          }, {
            value: 'OP440', label: 'OP440'
          }, {
            value: 'OP450', label: 'OP450'
          }, {
            value: 'OP460', label: 'OP460'
          }, {
            value: 'OP470', label: 'OP470'
          }, {
            value: 'OP480', label: 'OP480'
          }, {
            value: 'OP490', label: 'OP490'
          }, {
            value: 'OP500', label: 'OP500'
          }, {
            value: 'OP510', label: 'OP510'
          }, {
            value: 'OPHL10', label: 'OPHL10'
          }, {
            value: 'OPHL20', label: 'OPHL20'
          }, {
            value: 'OPHL30', label: 'OPHL30'
          }, {
            value: 'OPGG10', label: 'OPGG10'
          }, {
            value: 'OPGG20', label: 'OPGG20'
          }, {
            value: 'OPGG30', label: 'OPGG30'
          }, {
            value: 'OPGG40', label: 'OPGG40'
          }, {
            value: 'OPGG45', label: 'OPGG45'
          }, {
            value: 'OPGG50', label: 'OPGG50'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
        this.teamOptions = [
          {
            value: 'EB|EN装配线内一/EB|EN Internal Line 1/EB|EN Внутренняя линия 1',
            label: 'EB|EN装配线内一/EB|EN Internal Line 1/EB|EN Внутренняя линия 1'
          },
          {
            value: 'EB|EN装配线内二/EB|EN Internal Line 2/EB|EN Внутренняя линия 2',
            label: 'EB|EN装配线内二/EB|EN Internal Line 2/EB|EN Внутренняя линия 2'
          },
          {
            value: 'EB|EN装配线外一/EB|EN External Line 1/EB|EN Внешняя линия 1',
            label: 'EB|EN装配线外一/EB|EN External Line 1/EB|EN Внешняя линия 1'
          },
          {
            value: 'EB|EN装配线外二/EB|EN External Line 2/EB|EN Внешняя линия 2',
            label: 'EB|EN装配线外二/EB|EN External Line 2/EB|EN Внешняя линия 2'
          },
          {
            value: 'EB|EN热试线/EB|EN Hot test line/EB|EN Тепловая линия',
            label: 'EB|EN热试线/EB|EN Hot test line/EB|EN Тепловая линия'
          },
          {
            value: 'EB|EN缸盖线/EB|EN Cylinder head line/EB|EN Линия головки цилиндра',
            label: 'EB|EN缸盖线/EB|EN Cylinder head line/EB|EN Линия головки цилиндра'
          }
        ]
      }
      else if (newData === '机加/Machining Workshop/Обработки линия') {
        this.lineOptions = [
          {
            value: '缸体线/Cylinder block line/линия блока цилиндров',
            label: '缸体线/Cylinder block line/линия блока цилиндров'
          },
          {
            value: '缸盖线/Cylinder head line/линия головки блока цилиндров',
            label: '缸盖线/Cylinder head line/линия головки блока цилиндров'
          },
          {
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }
        ]
        this.opOptions = [
          {
            value: 'OP05', label: 'OP05'
          }, {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP20A', label: 'OP20A'
          }, {
            value: 'OP20B', label: 'OP20B'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30A', label: 'OP30A'
          }, {
            value: 'OP30B', label: 'OP30B'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP75', label: 'OP75'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP135', label: 'OP135'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          },{
            value: '其他/Other/Другие', label: '其他/Other/Другие'
          }]
        this.teamOptions = [
          {
            value: 'EN机加缸体线/EN Cylinder block line/EN Линия блоков цилиндров',
            label: 'EN机加缸体线/EN Cylinder block line/EN Линия блоков цилиндров'
          },
          {
            value: 'EN机加缸盖线/EN Cylinder head line/EN Линия головки цилиндра',
            label: 'EN机加缸盖线/EN Cylinder head line/EN Линия головки цилиндра'
          },
          {
            value: 'EB机加缸体线/EB Cylinder block line/EB Линия блоков цилиндров',
            label: 'EB机加缸体线/EB Cylinder block line/EB Линия блоков цилиндров'
          },
          {
            value: 'EB机加缸盖线/EB Cylinder head line/EB Линия головки цилиндра',
            label: 'EB机加缸盖线/EB Cylinder head line/EB Линия головки цилиндра'
          }
        ]
      }
    },
  },

  //—————————————————————————————————————————————————————————————————————————————————————
  //—————————————————————————————————————————————————————————————————————————————————————
  created() {
    // 初始化时设置默认时间为当前时间（确保是字符串）
    const now = new Date();
    this.selectedDateTime = this.formatDateTime(now);
    // 同时赋值给 check_time
    this.fixtureChecklistData.check_time = this.selectedDateTime;
  },

  //—————————————————————————————————————————————————————————————————————————————————————
  //—————————————————————————————————————————————————————————————————————————————————————
  methods: {
    //——————————————————————————————————————————基本信息及通用方法———————————————————————————————————————————
    //退出登录
    logOut(){
      localStorage.removeItem('u_token');
      localStorage.removeItem('userName')
      this.$router.push('UserLogin')
    },
    //查询用户信息的函数
    inquiry(){
      //输入用户编号，向后端查询信息
      const useId=localStorage.getItem('userName').replace(/"/g, '');
      this.$request.post('/useQueryPower',{
        queryFiledName:'goodProductCondition',
        userId:useId,
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }else {
          this.useName=result.data.name
          this.usePower=result.data.goodProductCondition
          this.useId=useId
        }
      })
    },

    //选择语言
    languageSelect(language){
      this.languageS=language
      // 其他语言切换逻辑...
      this.componentKey = !this.componentKey;
      // 调用子组件的语言切换方法
      if (this.$refs.fixtureListRef) {
        this.$refs.fixtureListRef.changeLanguage(language);
      }
      if (this.$refs.fixtureInspectionRef) {
        this.$refs.fixtureInspectionRef.changeLanguage(language);
      }
      if (language==='chinese'){
        this.projectList=this.projectListChinese
        //main
        this.main.qualityManagementSystem='俄动力质量管理系统'
        this.main.goodProductConditions='良品条件业务'

        this.main.description='请先选择左侧树节点以查看内容'
        this.main.edit='编辑'
        this.main.select='请选择'
        this.main.selectDate='选择日期'
        this.main.selectShift='选择班次'
        this.main.selectDepartment='选择责任部门'
        this.main.selectGroup='选择分组'
        this.main.chinese='中文'
        this.main.english='英文'
        this.main.russian='俄文'

        this.main.basicInformation='量检具基本信息'
        this.main.inspectionManagement='量检具点检管理'
        this.main.calibrationManagement='量检具校准管理'
        this.main.correctAndPrevent='纠正预防'
        this.main.questionList='问题清单'

        this.main.fixtureTechnicalCondition='工装技术条件'
        this.main.fixtureList='工装点检台账'
        this.main.fixtureInspectionManagement='工装点检管理'

        this.main.oilBasicInformation='油液基本信息'
        this.main.oilInspectionManagement='油液点检管理'
        this.main.oilHistoricalData='历史点检数据'
        this.main.oilTrendManagement='趋势管理'

        this.main.minorDefectRecord='微小缺陷记录'

        this.main.urgentTeardownStandard='检测标准'
        this.main.urgentTeardownResult='检测结果'
        //pageVal
        //量检具基本信息
        this.pageVal.translate='自动翻译'
        this.pageVal.cancel='取 消'
        this.pageVal.ok='确 定'
        this.pageVal.submit='提 交'
        this.pageVal.sureToDelete='确定删除数据吗？'
        this.pageVal.startCheck='请使用扫码枪扫描量检具二维码'
        this.pageVal.startCheck1='开始点检'
        this.pageVal.scanPlaceholder='请扫描二维码或手动输入编号'
        this.pageVal.manualInput='手动输入'
        this.pageVal.checkInformation='点检信息'
        this.pageVal.inputAbnormalDescription='请输入异常描述'
        this.pageVal.saveResult='保存点检结果'
        this.pageVal.scanAgain='重新扫描'
        this.pageVal.scanning='正在处理...'

        this.pageVal.checkDialog.number='编号：'
        this.pageVal.checkDialog.name='名称_中：'
        this.pageVal.checkDialog.name_english='名称_英：'
        this.pageVal.checkDialog.name_russian='名称_俄：'
        this.pageVal.checkDialog.inspection_frequency='点检频次：'
        this.pageVal.checkDialog.is_qualified='是否合格：'

        this.pageVal.measuringToolsList.order='序号'
        this.pageVal.measuringToolsList.number='编号'
        this.pageVal.measuringToolsList.name='名称(中)'
        this.pageVal.measuringToolsList.name_english='名称(英)'
        this.pageVal.measuringToolsList.name_russian='名称(俄)'
        this.pageVal.measuringToolsList.specification='规格型号'
        this.pageVal.measuringToolsList.is_checked='是否点检'
        this.pageVal.measuringToolsList.inspection_frequency='点检频次'
        this.pageVal.measuringToolsList.is_calibration='是否校准'
        this.pageVal.measuringToolsList.calibration_cycle='校准周期'
        this.pageVal.measuringToolsList.section='管理部门'
        this.pageVal.measuringToolsList.group='分组'

        //量检具点检管理
        this.pageVal.measuringToolChecklist.order='序号'
        this.pageVal.measuringToolChecklist.number='编号'
        this.pageVal.measuringToolChecklist.name='名称(中)'
        this.pageVal.measuringToolChecklist.name_english='名称(英)'
        this.pageVal.measuringToolChecklist.name_russian='名称(俄)'
        this.pageVal.measuringToolChecklist.inspection_frequency='点检频次'
        this.pageVal.measuringToolChecklist.is_qualified='是否合格'
        this.pageVal.measuringToolChecklist.abnormal_description='异常描述'
        this.pageVal.measuringToolChecklist.create_time='点检日期'
        this.pageVal.measuringToolChecklist.frequency='点检频次'
        this.pageVal.measuringToolChecklist.shouldCheck='应点检'
        this.pageVal.measuringToolChecklist.actualCheck='实际点检'

        //量检具校准记录
        this.pageVal.calibrationRecordList.calibration_result='校准结果'
        this.pageVal.calibrationRecordList.calibration_value='校准值'
        this.pageVal.calibrationRecordList.calibration_date='校准日期'
        this.pageVal.calibrationRecordList.next_calibration_date='下次校准日期'
        this.pageVal.calibrationRecordList.historical_information='历史校准信息'

        //纠正预防
        this.pageVal.correctAndPrevent.question_classification='问题分类'
        this.pageVal.correctAndPrevent.question_source='问题来源'
        this.pageVal.correctAndPrevent.source_classification='来源分类'
        this.pageVal.correctAndPrevent.department='责任部门'
        this.pageVal.correctAndPrevent.question_description='问题描述'
        this.pageVal.correctAndPrevent.generation_time='产生时间'
        this.pageVal.correctAndPrevent.cause_analysis='原因分析'
        this.pageVal.correctAndPrevent.corrective_action='整改对策'
        this.pageVal.correctAndPrevent.responsible_person='负责人'
        this.pageVal.correctAndPrevent.completion_time='完成时间'
        this.pageVal.correctAndPrevent.correct='纠正'
        this.pageVal.correctAndPrevent.corrective_measure='纠正措施(含横展)'
        this.pageVal.correctAndPrevent.preventive_measure='预防措施'

        //问题清单
        this.pageVal.questionList.correct_person='纠正人'
        this.pageVal.questionList.correct_time='纠正时间'

        //工装技术条件
        this.pageVal.fixtureTechnicalCondition.equipment_name='设备名称'
        this.pageVal.fixtureTechnicalCondition.equipment_name_english='设备名称_英'
        this.pageVal.fixtureTechnicalCondition.equipment_name_russian='设备名称_俄'
        this.pageVal.fixtureTechnicalCondition.equipment_model='设备型号'
        this.pageVal.fixtureTechnicalCondition.category='类别'
        this.pageVal.fixtureTechnicalCondition.category_english='类别_英'
        this.pageVal.fixtureTechnicalCondition.category_russian='类别_俄'
        this.pageVal.fixtureTechnicalCondition.fixture_name='工装名称'
        this.pageVal.fixtureTechnicalCondition.fixture_name_english='工装名称_英'
        this.pageVal.fixtureTechnicalCondition.fixture_name_russian='工装名称_俄'
        this.pageVal.fixtureTechnicalCondition.drawing_number='工装图纸编号'
        this.pageVal.fixtureTechnicalCondition.engine_model='应用机型'
        this.pageVal.fixtureTechnicalCondition.control_project='控制项目'
        this.pageVal.fixtureTechnicalCondition.control_project_english='控制项目_英'
        this.pageVal.fixtureTechnicalCondition.control_project_russian='控制项目_俄'
        this.pageVal.fixtureTechnicalCondition.measurement_technique='评价/测量技术'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_english='评价/测量技术_英'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_russian='评价/测量技术_俄'
        this.pageVal.fixtureTechnicalCondition.measurement_type='测量类型'
        this.pageVal.fixtureTechnicalCondition.standard_value='标准值'
        this.pageVal.fixtureTechnicalCondition.upper_tolerance='上公差'
        this.pageVal.fixtureTechnicalCondition.lower_tolerance='下公差'
        this.pageVal.fixtureTechnicalCondition.capacity='容量'
        this.pageVal.fixtureTechnicalCondition.frequency='频次'
        this.pageVal.fixtureTechnicalCondition.control_method='控制方法'
        this.pageVal.fixtureTechnicalCondition.control_method_english='控制方法_英'
        this.pageVal.fixtureTechnicalCondition.control_method_russian='控制方法_俄'
        this.pageVal.fixtureTechnicalCondition.failure_mode='失效模式'
        this.pageVal.fixtureTechnicalCondition.failure_mode_english='失效模式_英'
        this.pageVal.fixtureTechnicalCondition.failure_mode_russian='失效模式_俄'
        this.pageVal.fixtureTechnicalCondition.department='责任部门'
        this.pageVal.fixtureTechnicalCondition.source='工装来源'
        this.pageVal.fixtureTechnicalCondition.fixture_number='工装编号'
        this.pageVal.fixtureTechnicalCondition.line='线体'
        this.pageVal.fixtureTechnicalCondition.op='OP/存放地点'

        //工装台账
        this.pageVal.fixtureList.workshop='车间'
        this.pageVal.fixtureList.department='责任部门'
        this.pageVal.fixtureList.equipment_name='机床名称'
        this.pageVal.fixtureList.measurement_project='检查项目'
        this.pageVal.fixtureList.measurement_standard='检查标准'
        this.pageVal.fixtureList.cycle='周期'

        //工装点检管理
        this.pageVal.fixtureCheckInformation.number='工装编号：'
        this.pageVal.fixtureCheckInformation.name='工装名称：'
        this.pageVal.fixtureCheckInformation.check_result='点检结果'
        this.pageVal.fixtureCheckInformation.check_value='点检值'
        this.pageVal.fixtureCheckInformation.prepare='请准备好扫码枪后点击“开始点检”'

        //油液点检管理
        this.pageVal.oilChecklist.workshop='车间'
        this.pageVal.oilChecklist.op='工序'
        this.pageVal.oilChecklist.oil_name='油液名称'
        this.pageVal.oilChecklist.oil_name_english='油液名称_英'
        this.pageVal.oilChecklist.oil_name_russian='油液名称_俄'
        this.pageVal.oilChecklist.refractive_index='折光系数'
        this.pageVal.oilChecklist.project='点检项目'
        this.pageVal.oilChecklist.requirement='点检要求'
        this.pageVal.oilChecklist.upper_limit='上限'
        this.pageVal.oilChecklist.lower_limit='下限'
        this.pageVal.oilChecklist.actual_value='实测值'
        this.pageVal.oilChecklist.check_person='点检人'
        this.pageVal.oilChecklist.check_date='点检日期'
        this.pageVal.oilChecklist.check_shift='点检班次'
        this.pageVal.oilChecklist.export='导出'

        //微小缺陷记录
        this.pageVal.minorDefectRecord.team='班组'
        this.pageVal.minorDefectRecord.raised_by='提出人'
        this.pageVal.minorDefectRecord.date='日期'
        this.pageVal.minorDefectRecord.equipment_number='设备编号'
        this.pageVal.minorDefectRecord.defect_description='缺陷描述'
        this.pageVal.minorDefectRecord.defect_description_chinese='缺陷描述_中'
        this.pageVal.minorDefectRecord.defect_description_english='缺陷描述_英'
        this.pageVal.minorDefectRecord.defect_description_russian='缺陷描述_俄'
        this.pageVal.minorDefectRecord.countermeasure_content='对策内容'
        this.pageVal.minorDefectRecord.countermeasure_content_chinese='对策内容_中'
        this.pageVal.minorDefectRecord.countermeasure_content_english='对策内容_英'
        this.pageVal.minorDefectRecord.countermeasure_content_russian='对策内容_俄'
        this.pageVal.minorDefectRecord.spare_parts_information='备件信息'
        this.pageVal.minorDefectRecord.responsible_person='责任人'
        this.pageVal.minorDefectRecord.completion_date='完成日期'
        this.pageVal.minorDefectRecord.countermeasure_effectiveness='对策有效性'
        this.pageVal.minorDefectRecord.confirmed_by='确认人'
        this.pageVal.minorDefectRecord.closing='是否结题'
        this.pageVal.minorDefectRecord.reporting='是否汇报'

        //特急分解
        this.pageVal.urgentTeardown.engine_model='机型'
        this.pageVal.urgentTeardown.part_number='零部件图号'
        this.pageVal.urgentTeardown.part_name='零部件名称'
        this.pageVal.urgentTeardown.part_name_chinese='零部件名称_中'
        this.pageVal.urgentTeardown.part_name_english='零部件名称_英'
        this.pageVal.urgentTeardown.part_name_russian='零部件名称_俄'
        this.pageVal.urgentTeardown.measurement_project='检测项目'
        this.pageVal.urgentTeardown.measurement_project_chinese='检测项目_中'
        this.pageVal.urgentTeardown.measurement_project_english='检测项目_英'
        this.pageVal.urgentTeardown.measurement_project_russian='检测项目_俄'
        this.pageVal.urgentTeardown.category='类别'
        this.pageVal.urgentTeardown.standard_setter='标准建立人'
        this.pageVal.urgentTeardown.approver='批准人'
        this.pageVal.urgentTeardown.measurement_place='检测地点'
        this.pageVal.urgentTeardown.urgent_teardown_number='特急分解编号'
        this.pageVal.urgentTeardown.send_measurement_person='送检人'
        this.pageVal.urgentTeardown.engine_number='发动机号'
        this.pageVal.urgentTeardown.actual_value='实测值'
        this.pageVal.urgentTeardown.measuring_picture_person='检测/拍照人'
        this.pageVal.urgentTeardown.measurement_date='检测日期'
        this.pageVal.urgentTeardown.file_name='图片文件名称'
        this.pageVal.urgentTeardown.urgent_teardown_name='特急分解名称'
        this.pageVal.urgentTeardown.urgent_teardown_name_chinese='特急分解名称_中'
        this.pageVal.urgentTeardown.urgent_teardown_name_english='特急分解名称_英'
        this.pageVal.urgentTeardown.urgent_teardown_name_russian='特急分解名称_俄'
        this.pageVal.urgentTeardown.notes='备注'
        this.pageVal.urgentTeardown.finish='是否完成'
        this.pageVal.urgentTeardown.uploadPicture='上传照片'
        this.pageVal.urgentTeardown.uploadExcel='上传Excel'
        this.pageVal.urgentTeardown.upload='上传检测结果'
        this.pageVal.urgentTeardown.finished='分解完成'
        this.pageVal.urgentTeardown.sendToMeasure='我要送检'
        this.pageVal.urgentTeardown.measurement_project1='送检项目：'

        this.equipment_name='equipment_name'
        this.category='category'
        this.fixture_name='fixture_name'
        this.control_project='control_project'
        this.measurement_technique='measurement_technique'
        this.control_method='control_method'
        this.failure_mode='failure_mode'
        this.name='name'
      }
      else if (language==='english') {
        this.projectList=this.projectListEnglish
        //main
        this.main.qualityManagementSystem='Quality Management System'
        this.main.goodProductConditions='Good Product Conditions'

        this.main.description='Please select the left tree node first to view the content'
        this.main.edit='Edit'
        this.main.select='Select'
        this.main.selectDate='Select Date'
        this.main.selectShift='Select Shift'
        this.main.selectDepartment='Select Department'
        this.main.selectGroup='Select Group'
        this.main.chinese='Chinese'
        this.main.english='English'
        this.main.russian='Russian'

        this.main.basicInformation='Basic information'
        this.main.inspectionManagement='Inspection management'
        this.main.calibrationManagement='Calibration management'
        this.main.correctAndPrevent='Correct and prevent'
        this.main.questionList='Question list'

        this.main.fixtureTechnicalCondition='Fixture technical condition'
        this.main.fixtureList='Fixture inspection list'
        this.main.fixtureInspectionManagement='Inspection management'

        this.main.oilBasicInformation='Basic information'
        this.main.oilInspectionManagement='Inspection management'
        this.main.oilHistoricalData='Historical data'
        this.main.oilTrendManagement='Trend management'

        this.main.minorDefectRecord='Minor defect record'

        this.main.urgentTeardownStandard='Measurement Standard'
        this.main.urgentTeardownResult='Measurement Result'
        //pageVal
        this.pageVal.translate='Automatic translation'
        this.pageVal.cancel='Cancel'
        this.pageVal.ok='OK'
        this.pageVal.submit='Submit'
        this.pageVal.sureToDelete='Sure to delete the data?'
        this.pageVal.startCheck='Please use the barcode scanner to scan the QR code of the measuring tool'
        this.pageVal.startCheck1='Start Inspection'
        this.pageVal.scanPlaceholder='Please scan the QR code or manually enter the number'
        this.pageVal.manualInput='Manual Input'
        this.pageVal.checkInformation='Check Information'
        this.pageVal.inputAbnormalDescription='Enter Abnormal Description'
        this.pageVal.saveResult='Save'
        this.pageVal.scanAgain='Rescan'
        this.pageVal.scanning='Scanning'

        this.pageVal.checkDialog.number='Number:'
        this.pageVal.checkDialog.name='Name_Chinese:'
        this.pageVal.checkDialog.name_english='Name_English:'
        this.pageVal.checkDialog.name_russian='Name_Russian:'
        this.pageVal.checkDialog.inspection_frequency='Inspection Frequency:'
        this.pageVal.checkDialog.is_qualified='Is Qualified:'

        this.pageVal.measuringToolsList.order='Order'
        this.pageVal.measuringToolsList.number='Number'
        this.pageVal.measuringToolsList.name='Name_Chinese'
        this.pageVal.measuringToolsList.name_english='Name_English'
        this.pageVal.measuringToolsList.name_russian='Name_Russian'
        this.pageVal.measuringToolsList.specification='Specification'
        this.pageVal.measuringToolsList.is_checked='Is_Checked'
        this.pageVal.measuringToolsList.inspection_frequency='Inspection Frequency'
        this.pageVal.measuringToolsList.is_calibration='Is Calibrated'
        this.pageVal.measuringToolsList.calibration_cycle='Calibration Cycle'
        this.pageVal.measuringToolsList.section='Management Department'
        this.pageVal.measuringToolsList.group='Group'

        this.pageVal.measuringToolChecklist.order='Order'
        this.pageVal.measuringToolChecklist.number='Number'
        this.pageVal.measuringToolChecklist.name='Name_Chinese'
        this.pageVal.measuringToolChecklist.name_english='Name_English'
        this.pageVal.measuringToolChecklist.name_russian='Name_Russian'
        this.pageVal.measuringToolChecklist.inspection_frequency='Inspection Frequency'
        this.pageVal.measuringToolChecklist.is_qualified='Is Qualified?'
        this.pageVal.measuringToolChecklist.abnormal_description='Abnormal Description'
        this.pageVal.measuringToolChecklist.create_time='Create Time'
        this.pageVal.measuringToolChecklist.frequency='Frequency'
        this.pageVal.measuringToolChecklist.shouldCheck='Should Check'
        this.pageVal.measuringToolChecklist.actualCheck='Actual Check'

        this.pageVal.calibrationRecordList.calibration_result='Calibration Result'
        this.pageVal.calibrationRecordList.calibration_value='Calibration Value'
        this.pageVal.calibrationRecordList.calibration_date='Calibration Date'
        this.pageVal.calibrationRecordList.next_calibration_date='Next Calibration Date'
        this.pageVal.calibrationRecordList.historical_information='Historical Calibration Information'

        this.pageVal.correctAndPrevent.question_classification='Question Classification'
        this.pageVal.correctAndPrevent.question_source='Question Source'
        this.pageVal.correctAndPrevent.source_classification='Source Classification'
        this.pageVal.correctAndPrevent.department='Department'
        this.pageVal.correctAndPrevent.question_description='Question Description'
        this.pageVal.correctAndPrevent.generation_time='Generation Time'
        this.pageVal.correctAndPrevent.cause_analysis='Cause Analysis'
        this.pageVal.correctAndPrevent.corrective_action='Corrective Action'
        this.pageVal.correctAndPrevent.responsible_person='Responsible Person'
        this.pageVal.correctAndPrevent.completion_time='Completion Time'
        this.pageVal.correctAndPrevent.correct='Correct'
        this.pageVal.correctAndPrevent.corrective_measure='Corrective Measure'
        this.pageVal.correctAndPrevent.preventive_measure='Preventive Measure'

        this.pageVal.questionList.correct_person='Who corrects'
        this.pageVal.questionList.correct_time='Correction time'

        this.pageVal.fixtureTechnicalCondition.equipment_name='Equipment Name'
        this.pageVal.fixtureTechnicalCondition.equipment_name_english='Equipment Name_English'
        this.pageVal.fixtureTechnicalCondition.equipment_name_russian='Equipment Name_Russian'
        this.pageVal.fixtureTechnicalCondition.equipment_model='Equipment Model'
        this.pageVal.fixtureTechnicalCondition.category='Category'
        this.pageVal.fixtureTechnicalCondition.category_english='Category_English'
        this.pageVal.fixtureTechnicalCondition.category_russian='Category_Russian'
        this.pageVal.fixtureTechnicalCondition.fixture_name='Fixture Name'
        this.pageVal.fixtureTechnicalCondition.fixture_name_english='Fixture Name_English'
        this.pageVal.fixtureTechnicalCondition.fixture_name_russian='Fixture Name_Russian'
        this.pageVal.fixtureTechnicalCondition.drawing_number='Drawing Number'
        this.pageVal.fixtureTechnicalCondition.engine_model='Engine Model'
        this.pageVal.fixtureTechnicalCondition.control_project='Control Project'
        this.pageVal.fixtureTechnicalCondition.control_project_english='Control Project_English'
        this.pageVal.fixtureTechnicalCondition.control_project_russian='Control Project_Russian'
        this.pageVal.fixtureTechnicalCondition.measurement_technique='Measurement Technique'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_english='Measurement Technique_English'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_russian='Measurement Technique_Russian'
        this.pageVal.fixtureTechnicalCondition.measurement_type='Measurement Type'
        this.pageVal.fixtureTechnicalCondition.standard_value='Standard Value'
        this.pageVal.fixtureTechnicalCondition.upper_tolerance='Upper Tolerance'
        this.pageVal.fixtureTechnicalCondition.lower_tolerance='Lower Tolerance'
        this.pageVal.fixtureTechnicalCondition.capacity='Capacity'
        this.pageVal.fixtureTechnicalCondition.frequency='Frequency'
        this.pageVal.fixtureTechnicalCondition.control_method='Control Method'
        this.pageVal.fixtureTechnicalCondition.control_method_english='Control Method_English'
        this.pageVal.fixtureTechnicalCondition.control_method_russian='Control Method_Russian'
        this.pageVal.fixtureTechnicalCondition.failure_mode='Failure Mode'
        this.pageVal.fixtureTechnicalCondition.failure_mode_english='Failure Mode_English'
        this.pageVal.fixtureTechnicalCondition.failure_mode_russian='Failure Mode_Russian'
        this.pageVal.fixtureTechnicalCondition.department='Department'
        this.pageVal.fixtureTechnicalCondition.source='Source'
        this.pageVal.fixtureTechnicalCondition.fixture_number='Fixture Number'
        this.pageVal.fixtureTechnicalCondition.line='Line'
        this.pageVal.fixtureTechnicalCondition.op='OP/Location'

        this.pageVal.fixtureList.workshop='Workshop'
        this.pageVal.fixtureList.department='Responsible department'
        this.pageVal.fixtureList.equipment_name='Equipment Name'
        this.pageVal.fixtureList.measurement_project='Measurement Project'
        this.pageVal.fixtureList.measurement_standard='Measurement Standard'
        this.pageVal.fixtureList.cycle='Cycle'

        this.pageVal.fixtureCheckInformation.number='Fixture Number:'
        this.pageVal.fixtureCheckInformation.name='Fixture Name:'
        this.pageVal.fixtureCheckInformation.check_result='Check Result'
        this.pageVal.fixtureCheckInformation.check_value='Check Value'
        this.pageVal.fixtureCheckInformation.prepare='Please prepare the barcode scanner and click "Start Inspection"'

        this.pageVal.oilChecklist.workshop='Workshop'
        this.pageVal.oilChecklist.op='OP'
        this.pageVal.oilChecklist.oil_name='Oil&Liquid Name'
        this.pageVal.oilChecklist.oil_name_english='Oil&Liquid Name_English'
        this.pageVal.oilChecklist.oil_name_russian='Oil&Liquid Name_Russian'
        this.pageVal.oilChecklist.refractive_index='Refractive Index'
        this.pageVal.oilChecklist.project='Project'
        this.pageVal.oilChecklist.requirement='Requirement'
        this.pageVal.oilChecklist.upper_limit='Upper Limit'
        this.pageVal.oilChecklist.lower_limit='Lower Limit'
        this.pageVal.oilChecklist.actual_value='Actual Value'
        this.pageVal.oilChecklist.check_person='Checked By'
        this.pageVal.oilChecklist.check_date='Date of Check'
        this.pageVal.oilChecklist.check_shift='Work Shift'
        this.pageVal.oilChecklist.export='Export'

        //微小缺陷记录
        this.pageVal.minorDefectRecord.team='Team'
        this.pageVal.minorDefectRecord.raised_by='Raised By'
        this.pageVal.minorDefectRecord.date='Date'
        this.pageVal.minorDefectRecord.equipment_number='Equipment Number'
        this.pageVal.minorDefectRecord.defect_description='Defect Description'
        this.pageVal.minorDefectRecord.defect_description_chinese='Defect Description_Chinese'
        this.pageVal.minorDefectRecord.defect_description_english='Defect Description_English'
        this.pageVal.minorDefectRecord.defect_description_russian='Defect Description_Russian'
        this.pageVal.minorDefectRecord.countermeasure_content='Countermeasure'
        this.pageVal.minorDefectRecord.countermeasure_content_chinese='Countermeasure_Chinese'
        this.pageVal.minorDefectRecord.countermeasure_content_english='Countermeasure_English'
        this.pageVal.minorDefectRecord.countermeasure_content_russian='Countermeasure_Russian'
        this.pageVal.minorDefectRecord.spare_parts_information='Spare Parts Information'
        this.pageVal.minorDefectRecord.responsible_person='Responsible Person'
        this.pageVal.minorDefectRecord.completion_date='Completion Date'
        this.pageVal.minorDefectRecord.countermeasure_effectiveness='Countermeasure Effectiveness'
        this.pageVal.minorDefectRecord.confirmed_by='Confirmed By'
        this.pageVal.minorDefectRecord.closing='Closing'
        this.pageVal.minorDefectRecord.reporting='Reporting'

        this.pageVal.urgentTeardown.engine_model='Engine Model'
        this.pageVal.urgentTeardown.part_number='Part Number'
        this.pageVal.urgentTeardown.part_name='Part Name'
        this.pageVal.urgentTeardown.part_name_chinese='Part Name Chinese'
        this.pageVal.urgentTeardown.part_name_english='Part Name English'
        this.pageVal.urgentTeardown.part_name_russian='Part Name Russian'
        this.pageVal.urgentTeardown.measurement_project='Measurement Project'
        this.pageVal.urgentTeardown.measurement_project_chinese='Measurement Project_Chinese'
        this.pageVal.urgentTeardown.measurement_project_english='Measurement Project_English'
        this.pageVal.urgentTeardown.measurement_project_russian='Measurement Project_Russian'
        this.pageVal.urgentTeardown.category='Category'
        this.pageVal.urgentTeardown.standard_setter='Standard Setter'
        this.pageVal.urgentTeardown.approver='Approver'
        this.pageVal.urgentTeardown.measurement_place='Measurement Place'
        this.pageVal.urgentTeardown.urgent_teardown_number='Urgent Teardown Number'
        this.pageVal.urgentTeardown.send_measurement_person='Send Measurement Person'
        this.pageVal.urgentTeardown.engine_number='Engine Number'
        this.pageVal.urgentTeardown.actual_value='Actual Value'
        this.pageVal.urgentTeardown.measuring_picture_person='Person who measures/takes photos'
        this.pageVal.urgentTeardown.measurement_date='Measurement Date'
        this.pageVal.urgentTeardown.file_name='File Name'
        this.pageVal.urgentTeardown.urgent_teardown_name='Urgent Teardown Name'
        this.pageVal.urgentTeardown.urgent_teardown_name_chinese='Urgent Teardown Name_Chinese'
        this.pageVal.urgentTeardown.urgent_teardown_name_english='Urgent Teardown Name_English'
        this.pageVal.urgentTeardown.urgent_teardown_name_russian='Urgent Teardown Name_Russian'
        this.pageVal.urgentTeardown.notes='Notes'
        this.pageVal.urgentTeardown.finish='Whether completed'
        this.pageVal.urgentTeardown.uploadPicture='Upload Picture'
        this.pageVal.urgentTeardown.uploadExcel='Upload Excel'
        this.pageVal.urgentTeardown.upload='Upload Measurement Value'
        this.pageVal.urgentTeardown.finished='Complete Teardown'
        this.pageVal.urgentTeardown.sendToMeasure='Send to Measure'
        this.pageVal.urgentTeardown.measurement_project1='Project:'

        this.equipment_name='equipment_name_english'
        this.category='category_english'
        this.fixture_name='fixture_name_english'
        this.control_project='control_project_english'
        this.measurement_technique='measurement_technique_english'
        this.control_method='control_method_english'
        this.failure_mode='failure_mode_english'
        this.name='name_english'
      }
      else if (language==='russian') {
        this.projectList=this.projectListRussian
        //main
        this.main.qualityManagementSystem='Система управления качеством'
        this.main.goodProductConditions='Хорошие условия продукции'

        this.main.description='Пожалуйста, выберите левый узел дерева для просмотра контента'
        this.main.edit='Правка'
        this.main.select='Выберите'
        this.main.selectDate='Выберите дату'
        this.main.selectShift='Выберите смену'
        this.main.selectDepartment='Выберите отдел'
        this.main.selectGroup='Выберите группу'
        this.main.chinese='Китайский'
        this.main.english='Aнглийский'
        this.main.russian='Русский'

        this.main.basicInformation='Основная информация измерительных инструментов'
        this.main.inspectionManagement='управление инспекцией'
        this.main.calibrationManagement='управление калибровкой'
        this.main.correctAndPrevent='Исправить и предотвратить'
        this.main.questionList='Список вопросов'

        this.main.fixtureTechnicalCondition='Техническое состояние инструмента'
        this.main.fixtureList='Список инспекции крепления'
        this.main.fixtureInspectionManagement='управление инспекцией'

        this.main.oilBasicInformation='Основная информация'
        this.main.oilInspectionManagement='управление инспекцией'
        this.main.oilHistoricalData='Исторические данные'
        this.main.oilTrendManagement='Управление тенденциями'

        this.main.minorDefectRecord='Запис незначительных дефектов'

        this.main.urgentTeardownStandard='Стандарт измерения'
        this.main.urgentTeardownResult='Результат измерения'
        //pageVal
        this.pageVal.translate='Автоматический перевод'
        this.pageVal.cancel='Отмена'
        this.pageVal.ok='Подтвердить'
        this.pageVal.submit='Отправить'
        this.pageVal.sureToDelete='Уверен в удалении данных?'
        this.pageVal.startCheck='Пожалуйста, используйте сканер штрих-кодов для сканирования QR-кода измерительного инструмента'
        this.pageVal.startCheck1='Начало инспекции'
        this.pageVal.scanPlaceholder='Сканируйте QR-код или введите номер вручную'
        this.pageVal.manualInput='Ручный ввод'
        this.pageVal.checkInformation='Проверьте информацию'
        this.pageVal.inputAbnormalDescription='Введите аномальное описание'
        this.pageVal.saveResult='Сохранить'
        this.pageVal.scanAgain='Пересканирование'
        this.pageVal.scanning='Сканирование'

        this.pageVal.checkDialog.number='Номер:'
        this.pageVal.checkDialog.name='Имя_Китайский:'
        this.pageVal.checkDialog.name_english='Имя_Aнглийский:'
        this.pageVal.checkDialog.name_russian='Имя_Русский:'
        this.pageVal.checkDialog.inspection_frequency='Частота инспекции:'
        this.pageVal.checkDialog.is_qualified='Квалифицирован:'

        this.pageVal.measuringToolsList.order='Заказ'
        this.pageVal.measuringToolsList.number='Номер'
        this.pageVal.measuringToolsList.name='Имя_Китайский'
        this.pageVal.measuringToolsList.name_english='Имя_Aнглийский'
        this.pageVal.measuringToolsList.name_russian='Имя_Русский'
        this.pageVal.measuringToolsList.specification='Спецификация'
        this.pageVal.measuringToolsList.is_checked='Да_Проверено'
        this.pageVal.measuringToolsList.inspection_frequency='Частота инспекции'
        this.pageVal.measuringToolsList.is_calibration='Да_Калибрирован'
        this.pageVal.measuringToolsList.calibration_cycle='Цикл калибровки'
        this.pageVal.measuringToolsList.section='Отдел управления'
        this.pageVal.measuringToolsList.group='Группа'

        this.pageVal.measuringToolChecklist.order='Заказ'
        this.pageVal.measuringToolChecklist.number='Номер'
        this.pageVal.measuringToolChecklist.name='Имя_Китайский'
        this.pageVal.measuringToolChecklist.name_english='Имя_Aнглийский'
        this.pageVal.measuringToolChecklist.name_russian='Имя_Русский'
        this.pageVal.measuringToolChecklist.inspection_frequency='Частота инспекции'
        this.pageVal.measuringToolChecklist.is_qualified='Квалифицирован?'
        this.pageVal.measuringToolChecklist.abnormal_description='Абнормальное описание'
        this.pageVal.measuringToolChecklist.create_time='Создать время'
        this.pageVal.measuringToolChecklist.frequency='Частота'
        this.pageVal.measuringToolChecklist.shouldCheck='Должно проверить'
        this.pageVal.measuringToolChecklist.actualCheck='Фактическая проверка'

        this.pageVal.calibrationRecordList.calibration_result='Результат калибровки'
        this.pageVal.calibrationRecordList.calibration_value='Значение калибровки'
        this.pageVal.calibrationRecordList.calibration_date='Дата калибровки'
        this.pageVal.calibrationRecordList.next_calibration_date='Следующая дата калибровки'
        this.pageVal.calibrationRecordList.historical_information='Историческая информация о калибровке'

        this.pageVal.correctAndPrevent.question_classification='Классификация вопросов'
        this.pageVal.correctAndPrevent.question_source='Источник вопроса'
        this.pageVal.correctAndPrevent.source_classification='Классификация источника'
        this.pageVal.correctAndPrevent.department='Департамент'
        this.pageVal.correctAndPrevent.question_description='Описание вопроса'
        this.pageVal.correctAndPrevent.generation_time='Время поколения'
        this.pageVal.correctAndPrevent.cause_analysis='Анализ причин'
        this.pageVal.correctAndPrevent.corrective_action='Коррективные действия'
        this.pageVal.correctAndPrevent.responsible_person='Ответственное лицо'
        this.pageVal.correctAndPrevent.completion_time='Время завершения'
        this.pageVal.correctAndPrevent.correct='Правильно'
        this.pageVal.correctAndPrevent.corrective_measure='Коррективная мера'
        this.pageVal.correctAndPrevent.preventive_measure='Профилактическая мера'

        this.pageVal.questionList.correct_person='Кто исправляет'
        this.pageVal.questionList.correct_time='Время коррекции'

        this.pageVal.fixtureTechnicalCondition.equipment_name='Название оборудования_Китайский'
        this.pageVal.fixtureTechnicalCondition.equipment_name_english='Название оборудования_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.equipment_name_russian='Название оборудования_Русский'
        this.pageVal.fixtureTechnicalCondition.equipment_model='Модель оборудования'
        this.pageVal.fixtureTechnicalCondition.category='Категория_Китайский'
        this.pageVal.fixtureTechnicalCondition.category_english='Категория_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.category_russian='Категория_Русский'
        this.pageVal.fixtureTechnicalCondition.fixture_name='Название инструмента_Китайский'
        this.pageVal.fixtureTechnicalCondition.fixture_name_english='Название инструмента_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.fixture_name_russian='Название инструмента_Русский'
        this.pageVal.fixtureTechnicalCondition.drawing_number='Номер рисунка'
        this.pageVal.fixtureTechnicalCondition.engine_model='Модель двигателя'
        this.pageVal.fixtureTechnicalCondition.control_project='Проект контроля_Китайский'
        this.pageVal.fixtureTechnicalCondition.control_project_english='Проект контроля_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.control_project_russian='Проект контроля_Русский'
        this.pageVal.fixtureTechnicalCondition.measurement_technique='Техника измерения_Китайский'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_english='Техника измерения_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.measurement_technique_russian='Техника измерения_Русский'
        this.pageVal.fixtureTechnicalCondition.measurement_type='Тип измерения'
        this.pageVal.fixtureTechnicalCondition.standard_value='Стандартное_значение'
        this.pageVal.fixtureTechnicalCondition.upper_tolerance='Верхняя толерантность'
        this.pageVal.fixtureTechnicalCondition.lower_tolerance='Нижняя толерантность'
        this.pageVal.fixtureTechnicalCondition.capacity='Емкость'
        this.pageVal.fixtureTechnicalCondition.frequency='Частота'
        this.pageVal.fixtureTechnicalCondition.control_method='Метод контроля_Китайский'
        this.pageVal.fixtureTechnicalCondition.control_method_english='Метод контроля_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.control_method_russian='Метод контроля_Русский'
        this.pageVal.fixtureTechnicalCondition.failure_mode='Режим сбоя_Китайский'
        this.pageVal.fixtureTechnicalCondition.failure_mode_english='Режим сбоя_Aнглийский'
        this.pageVal.fixtureTechnicalCondition.failure_mode_russian='Режим сбоя_Русский'
        this.pageVal.fixtureTechnicalCondition.department='Департамент'
        this.pageVal.fixtureTechnicalCondition.source='Источник'
        this.pageVal.fixtureTechnicalCondition.fixture_number='Номер инструмента'
        this.pageVal.fixtureTechnicalCondition.line='Линия'
        this.pageVal.fixtureTechnicalCondition.op='Операция/Расположение'

        this.pageVal.fixtureList.workshop='Цех'
        this.pageVal.fixtureList.department='Ответственный отдел'
        this.pageVal.fixtureList.equipment_name='Название'
        this.pageVal.fixtureList.measurement_project='Проект'
        this.pageVal.fixtureList.measurement_standard='Стандарт проверки'
        this.pageVal.fixtureList.cycle='Цикл'

        this.pageVal.fixtureCheckInformation.number='Номер установки:'
        this.pageVal.fixtureCheckInformation.name='Название установки:'
        this.pageVal.fixtureCheckInformation.check_result='Проверьте результат'
        this.pageVal.fixtureCheckInformation.check_value='Проверьте стоимость'
        this.pageVal.fixtureCheckInformation.prepare='Подготовьте сканер штрих-кодов и нажмите кнопку "Начать инспекцию"'

        this.pageVal.oilChecklist.workshop='Цех'
        this.pageVal.oilChecklist.op='Операция'
        this.pageVal.oilChecklist.oil_name='Название масла'
        this.pageVal.oilChecklist.oil_name_english='Название масла_Aнглийский'
        this.pageVal.oilChecklist.oil_name_russian='Название масла_Русский'
        this.pageVal.oilChecklist.refractive_index='Коэффициент преломления'
        this.pageVal.oilChecklist.project='Проект'
        this.pageVal.oilChecklist.requirement='Требования'
        this.pageVal.oilChecklist.upper_limit='Верхний лимит'
        this.pageVal.oilChecklist.lower_limit='Нижний лимит'
        this.pageVal.oilChecklist.actual_value='Фактическое значение'
        this.pageVal.oilChecklist.check_person='Проверил'
        this.pageVal.oilChecklist.check_date='Дата проверки'
        this.pageVal.oilChecklist.check_shift='Смена проверки'
        this.pageVal.oilChecklist.export='Экспорт'

        //微小缺陷记录
        this.pageVal.minorDefectRecord.team='Бригада'
        this.pageVal.minorDefectRecord.raised_by='Инициатор'
        this.pageVal.minorDefectRecord.date='Дата'
        this.pageVal.minorDefectRecord.equipment_number='Номер оборудования'
        this.pageVal.minorDefectRecord.defect_description='Описание дефекта'
        this.pageVal.minorDefectRecord.defect_description_chinese='Описание дефекта_Китайский'
        this.pageVal.minorDefectRecord.defect_description_english='Описание дефекта_Aнглийский'
        this.pageVal.minorDefectRecord.defect_description_russian='Описание дефекта_Русский'
        this.pageVal.minorDefectRecord.countermeasure_content='Контрмера'
        this.pageVal.minorDefectRecord.countermeasure_content_chinese='Контрмера_Китайский'
        this.pageVal.minorDefectRecord.countermeasure_content_english='Контрмера_Aнглийский'
        this.pageVal.minorDefectRecord.countermeasure_content_russian='Контрмера_Русский'
        this.pageVal.minorDefectRecord.spare_parts_information='Информация о запчастях'
        this.pageVal.minorDefectRecord.responsible_person='Ответственное лицо'
        this.pageVal.minorDefectRecord.completion_date='Дата завершения'
        this.pageVal.minorDefectRecord.countermeasure_effectiveness='Эффективность мероприятий'
        this.pageVal.minorDefectRecord.confirmed_by='Проверивший'
        this.pageVal.minorDefectRecord.closing='Завершение'
        this.pageVal.minorDefectRecord.reporting='Отчетность'

        this.pageVal.urgentTeardown.engine_model='Модель двигателя'
        this.pageVal.urgentTeardown.part_number='Номер детали'
        this.pageVal.urgentTeardown.part_name='Название части'
        this.pageVal.urgentTeardown.part_name_chinese='Название части_Китайский'
        this.pageVal.urgentTeardown.part_name_english='Название части_Английский'
        this.pageVal.urgentTeardown.part_name_russian='Название части_Русский'
        this.pageVal.urgentTeardown.measurement_project='Проект измерения'
        this.pageVal.urgentTeardown.measurement_project_chinese='Проект измерения_Китайский'
        this.pageVal.urgentTeardown.measurement_project_english='Проект измерения_Английский'
        this.pageVal.urgentTeardown.measurement_project_russian='Проект измерения_Русский'
        this.pageVal.urgentTeardown.category='Категория'
        this.pageVal.urgentTeardown.standard_setter='Стандартный настройка'
        this.pageVal.urgentTeardown.approver='Утверждение'
        this.pageVal.urgentTeardown.measurement_place='Место измерения'
        this.pageVal.urgentTeardown.urgent_teardown_number='Срочный номер разрыва'
        this.pageVal.urgentTeardown.send_measurement_person='Отправить человек измерения'
        this.pageVal.urgentTeardown.engine_number='Номер двигателя'
        this.pageVal.urgentTeardown.actual_value='Фактическая стоимость'
        this.pageVal.urgentTeardown.measuring_picture_person='Человек, который измеряет/делает фотографии'
        this.pageVal.urgentTeardown.measurement_date='Дата измерения'
        this.pageVal.urgentTeardown.file_name='Имя файла'
        this.pageVal.urgentTeardown.urgent_teardown_name='Имя срочного разрыва'
        this.pageVal.urgentTeardown.urgent_teardown_name_chinese='Имя срочного разрыва_Китайский'
        this.pageVal.urgentTeardown.urgent_teardown_name_english='Имя срочного разрыва_Английский'
        this.pageVal.urgentTeardown.urgent_teardown_name_russian='Имя срочного разрыва_Русский'
        this.pageVal.urgentTeardown.notes='Примечания'
        this.pageVal.urgentTeardown.finish='Если завершено'
        this.pageVal.urgentTeardown.uploadPicture='Загрузить изображение'
        this.pageVal.urgentTeardown.uploadExcel='Загрузить Excel'
        this.pageVal.urgentTeardown.upload='Значение измерения загрузки'
        this.pageVal.urgentTeardown.finished='Полный разрыв'
        this.pageVal.urgentTeardown.sendToMeasure='Отправить на измерение'
        this.pageVal.urgentTeardown.measurement_project1='Проект:'

        this.equipment_name='equipment_name_russian'
        this.category='category_russian'
        this.fixture_name='fixture_name_russian'
        this.control_project='control_project_russian'
        this.measurement_technique='measurement_technique_russian'
        this.control_method='control_method_russian'
        this.failure_mode='failure_mode_russian'
        this.name='name_russian'
      }
    },

    //通用翻译
    translate(doe){
      //翻译微小缺陷对策内容的部分(富文本)
      if (doe===1){
        if (this.pointsActiveTab==='chinese'){
          this.countermeasureContentLoading=true
          translate_zh_en_ru(this.countermeasure_content_chinese.txt.html(),'zh',2).then(data=>{
            this.countermeasure_content_english.txt.html(data.en)
            this.countermeasure_content_russian.txt.html(data.ru)
            this.countermeasureContentLoading=false
          })
        }
        else if (this.pointsActiveTab==='english') {
          //判断用户在那个tab上，确定是那个语言
          // 中文翻译
          this.countermeasureContentLoading = true
          translate_zh_en_ru(this.countermeasure_content_english.txt.html(), 'en', 2).then(data => {
            this.countermeasure_content_russian.txt.html(data.ru)
            this.countermeasure_content_chinese.txt.html(data.zh)
            this.countermeasureContentLoading = false
          })
        }
        else if (this.pointsActiveTab==='russian'){
          this.countermeasureContentLoading=true
          //判断用户在那个tab上，确定是那个语言
          translate_zh_en_ru(this.countermeasure_content_russian.txt.html(), 'ru', 2).then(data => {
            this.countermeasure_content_english.txt.html(data.en)
            this.countermeasure_content_chinese.txt.html(data.zh)
            this.countermeasureContentLoading = false
          })
        }
      }
      //翻译特急分解检测项目的部分(文本)
      else if (doe===2){
        if (this.text4!==''){
          this.countermeasureContentLoading=true
          translate_zh_en_ru(this.text4,'zh',1).then(data=>{
            this.text5=data.en
            this.text6=data.ru
            this.countermeasureContentLoading=false
          })
        }
        else if (this.text5!=='') {
          this.countermeasureContentLoading = true
          translate_zh_en_ru(this.text5, 'en', 1).then(data => {
            this.text4=data.zh
            this.text6=data.ru
            this.countermeasureContentLoading = false
          })
        }
        else if (this.text6!==''){
          this.countermeasureContentLoading=true
          translate_zh_en_ru(this.text6, 'ru', 1).then(data => {
            this.text4=data.zh
            this.text5=data.en
            this.countermeasureContentLoading = false
          })
        }
      }
      //翻译微小缺陷缺陷描述的部分(文本)
      else if (doe===3){
        if (this.defect_description_chinese!==''){
          this.countermeasureContentLoading=true
          translate_zh_en_ru(this.defect_description_chinese,'zh',1).then(data=>{
            this.defect_description_english=data.en
            this.defect_description_russian=data.ru
            this.countermeasureContentLoading=false
          })
        }
        else if (this.defect_description_english!=='') {
          this.countermeasureContentLoading = true
          translate_zh_en_ru(this.defect_description_english, 'en', 1).then(data => {
            this.defect_description_chinese=data.zh
            this.defect_description_russian=data.ru
            this.countermeasureContentLoading = false
          })
        }
        else if (this.defect_description_russian!==''){
          this.countermeasureContentLoading=true
          translate_zh_en_ru(this.defect_description_russian, 'ru', 1).then(data => {
            this.defect_description_chinese=data.zh
            this.defect_description_english=data.en
            this.countermeasureContentLoading = false
          })
        }
      }
    },

    //通用：误关闭弹窗的确认函数(中英俄)
    getI18nText(key) {
      const i18nMessages = {
        chinese: {
          confirmClose: '确认关闭？',
          confirmButton: '确定',
          cancelButton: '取消',
        },
        english: {
          confirmClose: 'Sure to close?',
          confirmButton: 'OK',
          cancelButton: 'Cancel',
        },
        russian: {
          confirmClose: 'Уверен в закрытии?',
          confirmButton: 'Подтвердить',
          cancelButton: 'Отмена',
        },
      };
      return i18nMessages[this.languageS]?.[key] ?? i18nMessages.chinese[key];
    },
    handleClose(done) {
      this.$confirm(
          this.getI18nText('confirmClose'), // 消息内容
          {
            confirmButtonText: this.getI18nText('confirmButton'), // 确认按钮
            cancelButtonText: this.getI18nText('cancelButton'),    // 取消按钮
          }
      )
          .then(() => done())
          .catch(() => {});
    },

    //通用：得到UUID的id数据
    generateUUIDv4() {
      const bytes = new Uint8Array(16);
      crypto.getRandomValues(bytes);

      // 设置版本位（第6字节的高4位为0100）
      bytes[6] = (bytes[6] & 0x0f) | 0x40;
      // 设置变体位（第8字节的高2位为10）
      bytes[8] = (bytes[8] & 0x3f) | 0x80;

      // 转换为32字符十六进制字符串
      return Array.from(bytes, byte => {
        return byte.toString(16).padStart(2, '0');
      }).join('');
    },

    // 格式化日期时间为 localDateTime 格式 (yyyy-MM-dd HH:mm:ss)
    formatDateTime(date) {
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      const hours = String(date.getHours()).padStart(2, '0');
      const minutes = String(date.getMinutes()).padStart(2, '0');
      const seconds = String(date.getSeconds()).padStart(2, '0');

      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },

    //通用：保留指定位小数
    formatDecimal(value, decimals) {
      if (value === null || value === undefined) return '';
      return parseFloat(value).toFixed(decimals); // 保留指定位数小数
    },

    //——————————————————————————————————————tree、tab点击事件—————————————————————————————————————
    //点击tree
    async clickTree(data, node) {
      this.treeNode=node
      this.treeData=data
      if (data.label === '量检具' || data.label === 'Measuring Tools' || data.label === 'Измерительные') {
        if (node.parent.label === '品质管理科' || node.parent.label === 'Quality Management' || node.parent.label === 'Управления качеством') {
          this.selectTree = 0
        }
      }
      else if (data.label === '工装' || data.label === 'Fixture' || data.label === 'Устройство') {
        //清空点检页面
        this.fixtureTechnicalConditionData=[]
        this.scanCode=''
        this.scanDetailsFixture=''
        this.fixtureChecklistData=[]
        let department=''
        if (node.parent.label === '装配车间' || node.parent.label === 'Assembly Workshop' || node.parent.label === 'Сборочная линия') {
          this.selectTree = 2
          department = '装配/Assembly Workshop/Сборочная линия';
        }
        else if (node.parent.label === '产品技术科' || node.parent.label === 'Product Technology' || node.parent.label === 'Технология продукции') {
          this.selectTree = 1
          department='产技/Product Technology/Технология продукции';
        }
        // 刷新时间选择器为当前时间
        this.selectedDateTime = new Date();
        this.defaultTime = new Date();
        // 查询工装技术条件总条目
        this.queryFixtureTechnicalConditionQuantity(department).then(data => {
          this.fixtureTechnicalConditionPagination.total = data;
        });
        // 查询工装技术条件（分页）
        this.queryFixtureTechnicalConditionWithPagination(department).then(data => {
          this.fixtureTechnicalConditionData = data;
        });

        // 查询工装台账
        this.queryFixtureListAll();
      }
      else if (data.label === '油液' || data.label === 'Oil&Fluid' || data.label === 'Нефть&жидкость') {
        if (node.parent.label === '制造技术科' || node.parent.label === 'Manufacture Tech' || node.parent.label === 'Tехнологии производства') {
          this.selectTree = 4
        }
      }
      else if (data.label === '微小缺陷' || data.label === 'Minor Defect' || data.label === 'Мелкий дефект') {
        let workshop=''
        if (node.parent.label === '装配车间' || node.parent.label === 'Assembly Workshop' || node.parent.label === 'Сборочная линия') {
          this.selectTree = 5
          workshop = '装配/Assembly Workshop/Сборочная линия';
        }
        else if (node.parent.label === '机加车间' || node.parent.label === 'Machining Workshop' || node.parent.label === 'Обработки линия') {
          this.selectTree = 3
          workshop='机加/Machining Workshop/Обработки линия';
        }
        // 查询微小缺陷总条目
        this.queryMinorDefectRecordQuantity(workshop).then(data => {
          this.minorDefectRecordPagination.total = data;
        });
        // 查询微小缺陷（分页）
        this.queryMinorDefectRecordWithPagination(workshop).then(data => {
          this.minorDefectRecordData = data;
          this.filteredMinorDefectRecordData=[...this.minorDefectRecordData]
        });
      }
      else if (data.label === '特急分解' || data.label === 'Urgent Teardown' || data.label === 'Срочный разрыв') {
        if (node.parent.label === '品质管理科' || node.parent.label === 'Quality Management' || node.parent.label === 'Управления качеством') {
          this.selectTree = 6
        }
      }
    },

    //在tab控件上单击的函数（品管量检具）
    handleClick(tab, event) {
      console.log(tab, event);
      //点击量检具点检管理的反应
      if (this.activeName==='measuringToolsInspectionManagement'){
        //循坏，输出各频次下对应的是否点检为“yes”的数量
        //在 for 循环中，i 从 0 开始递增，遍历 this.measuringToolCheckResult 数组
        for (let i = 0; i < this.measuringToolCheckResult.length; i++) {
          //筛选出应该点检的数量，temp(数组)即为应该点检的数量
          //[i]为数组索引，用于存储应点检数量，实际点检数量
          let temp=this.filterMeasuringToolListIsChecked('yes',this.measuringToolCheckResult[i].frequency)
          let temp1=[]
          //将应点检数量设置为筛选结果的长度
          this.measuringToolCheckResult[i].shouldCheck=temp.length
          //输出实际点检值
          //如果应点检为0，那么实际点检就为0
          if (this.measuringToolCheckResult[i].shouldCheck===0){
            this.measuringToolCheckResult[i].actualCheck=0
          }
          //如果应点检不为0，输出实际点检的数量
          else {
            //timeTemp 是一个时间范围数组，用于存储查询点检记录的时间区间（开始时间和结束时间）。
            //它的格式通常是：[开始时间, 结束时间]
            let timeTemp=[]
            //如果班次选择及日期选择不为空，计算实际点检数
            if (this.shiftSelect!=='' && this.shiftSelect!==undefined && this.shiftSelect!==null){
              if (this.dateSelect!=='' && this.dateSelect!==undefined && this.dateSelect!==null){
                //如果点检频次为一个班次，则要判断所选班次为早、中、晚班
                if (this.measuringToolCheckResult[i].frequency==='1shift'){
                  if (this.shiftSelect==='早班/morning Shift/Ранняя смена'){
                    timeTemp=[this.dateSelect+' 13:00:00',this.dateSelect+' 22:30:00']
                  }
                  else if (this.shiftSelect==='中班/middle shift/Средний класс'){
                    // 1. 将日期字符串转换为Date对象
                    const date = new Date(this.dateSelect);
                    // 2. 获取下一天的日期
                    const nextDay = new Date(date);
                    nextDay.setDate(date.getDate() + 1);
                    // 3. 将下一天日期转换回字符串格式
                    const nextDayStr = nextDay.toISOString().split('T')[0]
                    timeTemp=[this.dateSelect+' 22:00:00',nextDayStr+' 07:30:00']
                  }
                  else if (this.shiftSelect==='夜班/night shift/Ночная работа'){
                    // 1. 将日期字符串转换为Date对象
                    const date = new Date(this.dateSelect);
                    // 2. 获取下一天的日期
                    const nextDay = new Date(date);
                    nextDay.setDate(date.getDate() + 1);
                    // 3. 将下一天日期转换回字符串格式
                    const nextDayStr = nextDay.toISOString().split('T')[0]
                    timeTemp=[nextDayStr+' 07:00:00',nextDayStr+' 13:30:00']
                  }
                }
                else if(this.measuringToolCheckResult[i].frequency==='1day'){
                  timeTemp=this.subtractDays(this.dateSelect,1)
                }
                else if (this.measuringToolCheckResult[i].frequency==='3days'){
                  timeTemp=this.subtractDays(this.dateSelect,3)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1week'){
                  timeTemp=this.subtractDays(this.dateSelect,8)
                }
                else if (this.measuringToolCheckResult[i].frequency==='2weeks'){
                  timeTemp=this.subtractDays(this.dateSelect,14)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1month'){
                  //因月份涉及大小月，使用date-fns库获取当月天数并计算时间范围
                  let date = parseISO(this.dateSelect);
                  let dayNmb=getDaysInMonth(date)
                  timeTemp=this.subtractDays(this.dateSelect,dayNmb)
                }
                //处理季度、半年和年度点检的情况，计算相应月份的天数并获取时间范围
                else if (this.measuringToolCheckResult[i].frequency==='3months'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,3)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
                else if (this.measuringToolCheckResult[i].frequency==='6months'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,6)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
                else if (this.measuringToolCheckResult[i].frequency==='1year'){
                  let dayNumber=this.calculateDaysAfterSubtractingMonths(this.dateSelect,12)
                  timeTemp=this.subtractDays(this.dateSelect,dayNumber)
                }
              }
            }
            //检查时间范围是否正确，若不正确，则提示错误
            if (timeTemp.length!==2){
              this.$message.error('应点检数量计算错误，请联系管理员')
            }
            //若时间范围正确
            else {
              //向后端发送请求查询该时间范围内的实际点检记录
              this.$request.post('/queryMeasuringToolChecklistOneFieldScopeGoodProduct',{
                fieldName:'create_time',
                minVal:timeTemp[0],
                maxVal:timeTemp[1],
              })
                  .then(result=>{
                    if (result.code === 401) {
                      this.$router.push('UserLogin')
                      alert("您未登录，请登录")
                    }else {
                      //将实际点检数设置为查询结果的数据长度
                      temp1=result.data
                      this.measuringToolCheckResult[i].actualCheck=0
                      for (let j = 0; j < temp.length; j++) {
                        for (let k = 0; k <temp1.length ; k++) {
                          if (temp[j].number===temp1[k].number){
                            this.measuringToolCheckResult[i].actualCheck=this.measuringToolCheckResult[i].actualCheck+1
                            break
                          }
                        }
                      }
                    }
                  })
            }
          }
        }

      }
      //点击量检具校准管理的反应
      else if(this.activeName==='measuringToolsCalibrationManagement'){
        this.$request.post("/queryCalibrationRecordGoodProduct")
            .then(result=>{
                  if (result.code === 401) {
                    this.$router.push('UserLogin')
                    alert("您未登录，请登录")
                  }else {
                    this.calibrationRecordData=result.data
                    this.filteredCalibrationRecordData=[...this.calibrationRecordData]
                    for (let i = 0; i <this.filteredCalibrationRecordData.length; i++) {
                      if (this.filteredCalibrationRecordData[i].calibration_date==='' || this.filteredCalibrationRecordData[i].calibration_date===undefined || this.filteredCalibrationRecordData[i].calibration_date===null){
                        this.filteredCalibrationRecordData[i].next_calibration_date="无上次校准记录"
                      }
                      else {
                        // 获取校准日期
                        let calibrationDate = new Date(this.filteredCalibrationRecordData[i].calibration_date);

                        // 加365天
                        calibrationDate.setDate(calibrationDate.getDate() + 365);

                        // 格式化为YYYY-MM-DD
                        const year = calibrationDate.getFullYear();
                        const month = String(calibrationDate.getMonth() + 1).padStart(2, '0');
                        const day = String(calibrationDate.getDate()).padStart(2, '0');
                        this.filteredCalibrationRecordData[i].next_calibration_date = `${year}-${month}-${day}`
                      }
                    }
                  }
            })
      }
      //点击纠正预防的反应
      // else if(this.activeName==='correctAndPrevent'){
      //   this.$request.post("/queryCorrectAndPreventGoodProduct")
      //       .then(result=>{
      //         if (result.code === 401) {
      //           this.$router.push('UserLogin')
      //           alert("您未登录，请登录")
      //         }else {
      //           this.correctAndPreventData=result.data
      //         }
      //       })
      // }
      //点击问题清单的反应
      else if(this.activeName==='questionList'){
        this.$request.post("/queryQuestionListGoodProduct")
            .then(result=>{
              if (result.code === 401) {
                this.$router.push('UserLogin')
                alert("您未登录，请登录")
              }else {
                this.questionListData=result.data
              }
            })
      }
    },

    //在tab控件上单击的函数（装配工装）
    handleClickAssemblyFixture(tab, event) {
      console.log(tab, event)
      //点击工装技术条件的反应
      if(this.activeNameFixture==='fixtureTechnicalCondition'){
        // 刷新时间选择器为当前时间
        this.selectedDateTime = new Date();
        this.defaultTime = new Date();
        // 使用分页查询方法
        this.queryFixtureTechnicalConditionWithPagination().then(allData => {
          this.fixtureTechnicalConditionData.total = allData;
        })

      }
      //点击工装台账的反应
      else if(this.activeNameFixture==='fixtureInspectionManagement'){
        // 焦点聚焦到输入框
        this.$nextTick(() => {
          this.focusInput();
        });
      }
    },

    //在tab控件上单击的函数（产技工装）
    handleClickProductFixture(tab, event) {
      console.log(tab, event)
      //点击工装技术条件的反应
      if(this.activeNameFixture1==='fixtureTechnicalCondition'){
        // 刷新时间选择器为当前时间
        this.selectedDateTime = new Date();
        this.defaultTime = new Date();
        // 使用分页查询方法
        this.queryFixtureTechnicalConditionWithPagination().then(allData => {
          this.fixtureTechnicalConditionData.total = allData;
        })
      }
      else if(this.activeNameFixture1==='fixtureList'){
        this.drawingNumberOptionList()
        this.queryFixtureListAll()
      }
      else if (this.activeNameFixture1==='fixtureInspectionManagement'){
        this.queryFixtureListAll().then(dataList => {
          // 批量处理
          const tempList = dataList.map(data => ({
            workshop:data.workshop,
            department:data.department,
            equipment_name:data.equipment_name,
            line:data.line,
            op:data.op,
            measurement_project:data.measurement_project,
            drawing_number:data.drawing_number,
            measurement_standard:data.measurement_standard,
            measurement_type:data.measurement_type,
            standard_value:data.standard_value,
            upper_tolerance:data.upper_tolerance,
            lower_tolerance:data.lower_tolerance,
            model:data.model,
            measurement_technique:data.measurement_technique,
            cycle:data.cycle,
            fixture_number:'',
            }));
          // 添加到现有数据中
          this.fixtureChecklistData = [...this.fixtureChecklistData, ...tempList];
          return tempList;
        });
      }
    },

    //在tab控件上单击的函数（制技油液）
    handleClickManufacturingOil(tab, event) {
      console.log(tab, event)
      //点击油液基本信息的反应
      if(this.activeNameManufacturingOil==='oilBasicInformation'){
        this.queryOilListAll()
      }
      else if(this.activeNameManufacturingOil==='oilHistoricalData'){
        let workshop='机加/Machining Workshop/Обработки линия'
        this.queryOilHistoricalDataQuantity(workshop).then(data => {
          this.oilHistoricalDataPagination.total = data;
        });
        // 查询历史点检记录（分页）
        this.queryOilHistoricalDataWithPagination(workshop).then(data => {
          this.oilHistoricalData = data;
          this.filteredOilHistoricalData=_.cloneDeep(this.oilHistoricalData)
        });
      }
    },

    //在tab控件上单击的函数（机加微小缺陷）
    handleClickMachiningMinor(tab, event) {
      console.log(tab, event)
    },

    //在tab控件上单击的函数（装配微小缺陷）
    handleClickAssemblyMinor(tab, event) {
      console.log(tab, event)
    },

    //在tab控件上单击的函数（品管特急分解）
    handleClickUrgentTeardown(tab, event) {
      console.log(tab, event)
      if(this.activeNameUrgentTeardown==='urgentTeardownResult'){
        // 查询特急分解检测标准总条目
        this.queryUrgentTeardownResultQuantity().then(data => {
          this.urgentTeardownResultPagination.total = data;
        });
        // 查询特急分解检测标准（分页）
        this.queryUrgentTeardownResultWithPagination().then(data => {
          this.urgentTeardownResultData = data;
          this.filteredUrgentTeardownResultData=[...this.urgentTeardownResultData]
        });
      }
    },

    //—————————————————————————————————————————量检具基本信息————————————————————————————————————————————
    //显示编辑计量器具基本信息的弹窗，doe 1：添加，2：编辑；
    measuringToolsListEditShow(doe,scope){
      this.measuringToolsListDoe=doe
      this.measuringToolsListScope=scope
      //要对计量工具基础表进行插入
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条计量器具基本信息'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of basic information of measuring tools'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку базовой информации измерительных инструментов'
        }
        //对表单变量赋值，给一个空的
        this.measuringToolsListForm={
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //逻辑删除
          sys_deleted:0,
          //自有系统的主键
          idUse:0,
          //创建时间
          establishTime:'',
          //修改时间
          updateTime:'',

          //编号
          number:'',
          //名称
          name:'',
          //名称(英)
          name_english:'',
          //名称(俄)
          name_russian:'',
          //规格型号
          specification:'',
          //是否点检
          is_checked:'',
          //点检频次
          inspection_frequency:'',
          //是否校准
          is_calibration:'',
          //校准周期
          calibration_cycle:'',
          //使用部门
          section:'',
          //分组
          group:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //机型
          engine_model:''
        }
        //控制弹窗打开
        this.measuringToolsListDialog=true
      }

      //对doe进行赋值，当等于2时，提示表头信息
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条计量器具基本信息'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of basic information of measuring tools'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку базовой информации измерительных инструментов'
        }
        //给表单赋值
        this.measuringToolsListForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.measuringToolsListDialog=true
      }
    },
    //点击编辑计量器具基本信息弹窗中的确定
    measuringToolsListOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.measuringToolsListForm.number==='' || this.measuringToolsListForm.number===null || this.measuringToolsListForm.number===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"编号"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "number"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "номер"')
        }
        return
      }
      if(this.measuringToolsListForm.name==='' || this.measuringToolsListForm.name===null || this.measuringToolsListForm.name===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"名称(中)"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "name"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "имя"')
        }
        return
      }
      if(this.measuringToolsListForm.name_english==='' || this.measuringToolsListForm.name_english===null || this.measuringToolsListForm.name_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"名称(英)"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "English name"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Английское имя"')
        }
        return
      }
      if(this.measuringToolsListForm.name_russian==='' || this.measuringToolsListForm.name_russian===null || this.measuringToolsListForm.name_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"名称(俄)"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Russian name"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "русское имя"')
        }
        return
      }
      if(this.measuringToolsListForm.specification==='' || this.measuringToolsListForm.specification===null || this.measuringToolsListForm.specification===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"规格型号"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "specification"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "спецификацию"')
        }
        return
      }
      if(this.measuringToolsListForm.is_checked==='' || this.measuringToolsListForm.is_checked===null || this.measuringToolsListForm.is_checked===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"是否点检"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Is_Checked"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Квалифицированный"')
        }
        return
      }
      if(this.measuringToolsListForm.inspection_frequency==='' || this.measuringToolsListForm.inspection_frequency===null || this.measuringToolsListForm.inspection_frequency===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"点检频次"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Inspection frequency"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Частота проверки"')
        }
        return
      }
      if(this.measuringToolsListForm.is_calibration==='' || this.measuringToolsListForm.is_calibration===null || this.measuringToolsListForm.is_calibration===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"是否校准"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Calibrate"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Калибрировать"')
        }
        return
      }
      if(this.measuringToolsListForm.calibration_cycle==='' || this.measuringToolsListForm.calibration_cycle===null || this.measuringToolsListForm.calibration_cycle===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"校准周期"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Calibration cycle"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Цикл калибровки"')
        }
        return
      }

      //当插入一行时
      if (this.measuringToolsListDoe===1){
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertMeasuringToolsListGoodProduct',this.measuringToolsListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            //修改大表数据
            this.queryMeasuringToolsListAll()
            //关闭窗口
            this.measuringToolsListDialog=false
          }
        })
      }
      //当编辑某一行时
      else if (this.measuringToolsListDoe===2){
        this.$request.post('/editMeasuringToolsListGoodProduct',this.measuringToolsListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.measuringToolsListData.splice(this.measuringToolsListScope.$index,1,this.measuringToolsListForm)
            //修改筛选大表
            this.filteredMeasuringToolsListData=[...this.measuringToolsListData]

            //关闭窗口
            this.measuringToolsListDialog=false
          }
        })
      }
    },

    //辅助函数：查询计量器具基础信息表的所有信息
    async queryMeasuringToolsListAll(){
      return this.$request.post('/queryMeasuringToolsListAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //将数据输出到页面表格中
          this.measuringToolsListData=result.data
          this.filteredMeasuringToolsListData=[...this.measuringToolsListData]
        }
      })
    },

    // 筛选原始数据表格
    handleFilterMeasuringTool() {
      // 如果没有原始数据，直接返回
      if (!this.measuringToolsListData || this.measuringToolsListData.length === 0) {
        this.filteredMeasuringToolsListData = [];
        return;
      }
      // 筛选逻辑
      this.filteredMeasuringToolsListData = this.measuringToolsListData.filter(item => {
        const matchesNumber = !this.number ||
            (item.number &&
                item.number.includes(this.number));

        return matchesNumber;
      });

      // 强制刷新表格（如果使用 :key 绑定）
      this.componentKey++;
    },
    // 重置筛选条件
    resetFilterMeasuringTool() {
      this.number = '';
      this.filteredMeasuringToolsListData = [...this.measuringToolsListData];
      this.componentKey++; // 强制刷新表格
    },

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~生成二维码~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // 显示二维码弹窗
    qrCodeShow(row) {
      // 检查数据有效性
      if (!row || !row.number) {
        this.$message.warning('无法生成二维码：数据不完整');
        return;
      }

      this.currentNumber = row.number;
      this.qrCodeDialog = true;

      // 等待对话框完全渲染
      this.$nextTick(() => {
        // 添加短暂延迟确保canvas元素已创建
        setTimeout(() => {
          this.generateQRCode(this.currentNumber);
        }, 100);
      });
    },
    // 生成二维码
    generateQRCode(text) {
      // 验证输入文本
      if (!text || typeof text !== 'string') {
        console.error('无效的二维码文本:', text);
        this.$message.error('无法生成二维码：无效的编号');
        return;
      }

      const canvas = document.getElementById('qr-canvas');

      // 确保canvas元素存在
      if (!canvas) {
        console.error('Canvas元素未找到');
        this.$message.error('生成二维码失败：页面元素未加载');
        return;
      }

      // 清空canvas（防止重复绘制）
      const context = canvas.getContext('2d');
      context.clearRect(0, 0, canvas.width, canvas.height);

      // 生成二维码
      QRCode.toCanvas(canvas, text, {
        width: 200,
        margin: 1,
        color: {
          dark: '#000000',
          light: '#ffffff'
        }
      }, (error) => {
        if (error) {
          console.error('生成二维码失败:', error);
          this.$message.error('生成二维码失败');
        } else {
          console.log('二维码生成成功');
        }
      });
    },
    // 下载二维码
    downloadQRCode() {
      if (!this.currentNumber) {
        this.$message.warning('没有可下载的二维码');
        return;
      }

      const canvas = document.getElementById('qr-canvas');
      if (!canvas) {
        this.$message.error('找不到二维码图像');
        return;
      }

      try {
        const link = document.createElement('a');
        link.download = `量具二维码_${this.currentNumber}.png`;
        link.href = canvas.toDataURL('image/png');
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);
        this.$message.success('二维码下载成功');
      } catch (error) {
        console.error('下载二维码失败:', error);
        this.$message.error('下载二维码失败');
      }
    },
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~开始扫码点检-量检具~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //开始点检的提示弹窗
    startCheckDialogShow(){
      // 清空输入框内容
      this.scanCode = '';
      if (this.languageS==='chinese'){
        this.titleMessage='开始点检'
      }
      else if (this.languageS==='english'){
        this.titleMessage='Start Inspection'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Начало инспекции'
      }
      this.startCheckDialog=true
    },
    // 弹窗打开后自动聚焦输入框
    focusInput() {
      this.$nextTick(() => {
        if (this.$refs.scanInput) {
          this.$refs.scanInput.focus();
        }
      });
    },

    // 处理扫描/输入
    async handleScan() {
      if (!this.scanCode.trim()) {
        if (this.languageS==='chinese'){
          this.$message.warning('请扫描二维码或手动输入编号')
        }
        else if (this.languageS==='english'){
          this.$message.warning('Please scan the QR code or manually enter the number')
        }
        else if (this.languageS==='russian'){
          this.$message.warning('Сканируйте QR-код или введите номер вручную')
        }
        return;
      }
      this.scanLoading = true;
      try {
        // 解析二维码内容（假设二维码内容就是编号）
        const toolNumber = this.scanCode.trim();

        // 验证编号是否存在
        const exists = this.measuringToolsListData.some(item =>
            item.number === toolNumber
        );

        if (!exists) {
          if (this.languageS==='chinese'){
            this.$message.error('该编号不存在于量检具基本信息中')
          }
          else if (this.languageS==='english'){
            this.$message.error('The number does not exist')
          }
          else if (this.languageS==='russian'){
            this.$message.error('Номер не существует')
          }
          return;
        }

        // 查找对应的量检具信息
        const toolInfo = this.measuringToolsListData.find(item =>
            item.number === toolNumber
        );

        if (toolInfo) {
          // 显示详细信息
          this.scanResult = toolInfo;
          this.scanDetails = {
            number: toolInfo.number,
            name: toolInfo.name,
            name_english: toolInfo.name_english,
            name_russian: toolInfo.name_russian,
            inspection_frequency: toolInfo.inspection_frequency,
            is_qualified: '', // 初始为空，需要用户选择
            abnormal_description: '' // 初始为空
          };

          // 自动将焦点转移到结果区域
          this.$nextTick(() => {
            this.focusOnResultArea();
          });
        }

      }
      catch (error) {
        this.$message.error(error.message || '处理二维码失败');
      } finally {
        this.scanLoading = false;
      }
    },
    // 结果区域的键盘事件处理
    handleResultAreaKeydown(event) {
      // 空格键选择YES
      if (event.code === 'Space') {
        event.preventDefault();
        this.scanDetails.is_qualified = 'YES';
      }

      // 回车键提交
      if (event.code === 'Enter') {
        event.preventDefault();
        if (this.scanDetails.is_qualified) {
          this.saveCheckResult();
        } else {
          if (this.languageS==='chinese'){
            this.$message.warning('请先选择是否合格')
          }
          else if (this.languageS==='english'){
            this.$message.warning('Please choose whether it is qualified first')
          }
          else if (this.languageS==='russian'){
            this.$message.warning('Выберите, квалифицируется ли он в первую очередь')
          }
        }
      }
    },
    // 将焦点转移到结果区域
    focusOnResultArea() {
      if (this.$refs.resultArea) {
        this.$refs.resultArea.focus();
      }
    },
    // 新增：二维码解析方法
    parseTaskUid(code) {
      try {
        // 尝试作为URL解析
        const url = new URL(code);
        return url.searchParams.get('task_uid');
      } catch {
        // 如果不是标准URL，尝试从字符串直接提取
        const match = code.match(/(?:task_uid|任务ID)[=:]([\w-]+)/i);
        return match ? match[1] : null;
      }
    },

    // 手动输入处理
    handleManualInput() {
      this.$prompt(
          this.pageVal.manualInputNumber || '请输入量检具编号',
          this.pageVal.manualInputTitle || '手动输入',
          {
            inputPattern: /MJ2023\d{3}/,
            inputErrorMessage: this.pageVal.numberFormatError || '请输入有效的量检具编号'
          }
      ).then(({ value }) => {
        this.scanCode = value;
        this.handleScan();
      }).catch(() => {
        this.$message.info(this.pageVal.inputCanceled || '已取消输入');
      });
    },

    // 保存点检结果
    saveCheckResult() {
      if (!this.scanDetails.is_qualified) {
        if (this.languageS==='chinese'){
          this.$message.warning('请选择是否合格')
        }
        else if (this.languageS==='english'){
          this.$message.warning('Please choose whether it is qualified')
        }
        else if (this.languageS==='russian'){
          this.$message.warning('Выберите, является ли он квалифицированным')
        }
        return;
      }
      // 构建完整的点检记录数据
      const checkRecord = {
        number: this.scanDetails.number,
        name: this.scanDetails.name,
        name_english: this.scanDetails.name_english,
        name_russian: this.scanDetails.name_russian,
        specification: '',
        inspection_frequency: this.scanDetails.inspection_frequency,
        is_qualified: this.scanDetails.is_qualified,
        abnormal_description: this.scanDetails.abnormal_description || '',
        basicInformationId: '',
        // 系统字段
        id:this.generateUUIDv4(),
        creator: `${this.useId}/${this.useName}`,
        sys_update_user: `${this.useId}/${this.useName}`,
        sys_deleted: 0
      };

      // 保存点检结果
      this.$request.post('/insertMeasuringToolChecklistGoodProduct',checkRecord).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          if (this.languageS==='chinese'){
            this.$message.success('点检结果保存成功')
          }
          else if (this.languageS==='english'){
            this.$message.success('Saved successfully')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Успешно сохранено')
          }
        }
      });
      // 重置扫描状态，但不关闭弹窗
      this.resetScan();
    },

    // 重置扫描状态
    resetScan() {
      this.scanResult = null;
      this.scanCode = '';
      this.scanDetails = {
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        inspection_frequency: '',
        is_qualified: '',
        abnormal_description: ''
      };
      this.scanDetailsFixture = {
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        op:''
      };
      this.fixtureChecklistData = []; // 清空点检表数据

      // 焦点回到输入框
      this.$nextTick(() => {
        this.focusInput();
      });
    },

    // 全局键盘事件处理
    handleGlobalKeydown(event) {
      // 只有当扫描结果显示时才启用快捷键
      if (!this.scanResult) return;

      // 防止在输入框中触发
      if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
        return;
      }

      // 空格键选择YES
      if (event.code === 'Space') {
        event.preventDefault();
        this.scanDetails.is_qualified = 'YES';
      }

      // 回车键提交
      if (event.code === 'Enter') {
        event.preventDefault();
        if (this.scanDetails.is_qualified) {
          this.saveCheckResult();
        } else {
          if (this.languageS==='chinese'){
            this.$message.warning('请先选择是否合格')
          }
          else if (this.languageS==='english'){
            this.$message.warning('')
          }
          else if (this.languageS==='russian'){
            this.$message.warning('')
          }
        }
      }
    },

    //———————————————————————————————————————————量检具点检管理——————————————————————————————————————————
    //显示未点检量检具明细的弹窗
    uncheckedMeasuringToolsShow(scope){
      if (this.languageS==='chinese'){
        this.titleMessage='未点检量检具'
      }
      else if (this.languageS==='english'){
        this.titleMessage='Unchecked measuring tools'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Непроверенные измерительные инструменты'
      }
      this.uncheckedMeasuringTools=[]
      if (scope.row.frequency==='1shift'){
        this.uncheckedMeasuringTools=this.shiftUnchecked
      }
      else if (scope.row.frequency==='1day'){
        this.uncheckedMeasuringTools=this.dayUnchecked
      }
      else if (scope.row.frequency==='3days'){
        this.uncheckedMeasuringTools=this.threeDaysUnchecked
      }
      else if (scope.row.frequency==='1week'){
        this.uncheckedMeasuringTools=this.weekUnchecked
      }
      else if (scope.row.frequency==='2weeks'){
        this.uncheckedMeasuringTools=this.twoWeeksUnchecked
      }
      else if (scope.row.frequency==='1month'){
        this.uncheckedMeasuringTools=this.monthUnchecked
      }
      else if (scope.row.frequency==='3months'){
        this.uncheckedMeasuringTools=this.threeMonthsUnchecked
      }
      else if (scope.row.frequency==='6months'){
        this.uncheckedMeasuringTools=this.sixMonthsUnchecked
      }
      else if (scope.row.frequency==='1year'){
        this.uncheckedMeasuringTools=this.yearUnchecked
      }
      this.uncheckedMeasuringToolsDialog=true
    },

    //———————————————————————————————————————————量检具校准管理——————————————————————————————————————————
    //显示编辑计量器具校准记录的弹窗，doe 1：编辑；
    calibrationRecordListEditShow(doe,scope){
      this.calibrationRecordListDoe=doe
      this.calibrationRecordListScope=scope
      //要对计量工具校准记录进行编辑
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        this.titleMessage='您正在修改一条计量器具校准记录'
        //给表单赋值
        this.calibrationRecordListForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.calibrationRecordListDialog=true
      }
      else if (doe===2){
        this.titleMessage='您正在新增一条计量器具校准记录'
        //给表单赋值
        this.calibrationRecordListForm=_.cloneDeep(scope.row)
        this.calibrationRecordListForm.calibration_result=''
        this.calibrationRecordListForm.calibration_value=''
        this.calibrationRecordListForm.calibration_date=''
        //控制弹窗打开
        this.calibrationRecordListDialog=true
      }
    },
    //点击编辑计量器具校准记录弹窗中的确定
    calibrationRecordListOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.calibrationRecordListForm.calibration_result==='' || this.calibrationRecordListForm.calibration_result===null || this.calibrationRecordListForm.calibration_result===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"校准结果"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Calibration Result"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Результат калибровки"')
        }
        return
      }
      if(this.calibrationRecordListForm.calibration_value==='' || this.calibrationRecordListForm.calibration_value===null || this.calibrationRecordListForm.calibration_value===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"校准值"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Calibration Value"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Значение калибровки"')
        }
        return
      }
      if(this.calibrationRecordListForm.calibration_date==='' || this.calibrationRecordListForm.calibration_date===null || this.calibrationRecordListForm.calibration_date===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"校准日期"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Calibrate Date"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Дата калибровки"')
        }
        return
      }

      // 组合历史数据
      //当编辑某一行时
      if (this.calibrationRecordListDoe===1){
        this.$request.post('/editCalibrationRecordGoodProduct',this.calibrationRecordListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            this.$message.success('编辑成功')
            //修改大表数据
            this.calibrationRecordData.splice(this.calibrationRecordListScope.$index,1,this.calibrationRecordListForm)
            this.filteredCalibrationRecordData=[...this.calibrationRecordData]
            //关闭窗口
            this.calibrationRecordListDialog=false
          }
        })
      }
      else if (this.calibrationRecordListDoe===2){
        //组合历史校准数据
        // if (this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_result==='' || this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_result===undefined || this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_result===null){
        //   this.calibrationRecordListForm.historical_information=''
        // }
        // else {
        //   if (this.calibrationRecordListForm.historical_information==='' || this.calibrationRecordListForm.historical_information===undefined || this.calibrationRecordListForm.historical_information===null){
        //     this.calibrationRecordListForm.historical_information
        //         =
        //         this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_result
        //         + '|%|' +
        //         this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_value
        //         + '|%|' +
        //         this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_date
        //   }
        //   else {
        //     this.calibrationRecordListForm.historical_information=this.calibrationRecordListForm.historical_information
        //     +"|-|"+
        //     this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_result
        //     + '|%|' +
        //     this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_value
        //     + '|%|' +
        //     this.calibrationRecordData[this.calibrationRecordListScope.$index].calibration_date
        //   }
        // }
        // 获取当前行的数据
        const currentRow = this.calibrationRecordData[this.calibrationRecordListScope.$index];

        // 构建新的历史记录条目，包含当前的标准值、公差值
        const newHistoryEntry = [
          this.calibrationRecordListForm.calibration_result,
          this.calibrationRecordListForm.calibration_value,
          this.calibrationRecordListForm.calibration_date,
          this.calibrationRecordListForm.standard_value,  // 使用当前表单中的标准值
          this.calibrationRecordListForm.upper_tolerance, // 使用当前表单中的上公差
          this.calibrationRecordListForm.lower_tolerance  // 使用当前表单中的下公差
        ].join('|%|');

        // 组合历史校准数据
        if (currentRow.calibration_result &&
            currentRow.calibration_result !== '' &&
            currentRow.calibration_result !== null &&
            currentRow.calibration_result !== undefined) {

          // 如果已有历史记录，追加新记录到前面
          if (currentRow.historical_information &&
              currentRow.historical_information !== '' &&
              currentRow.historical_information !== null &&
              currentRow.historical_information !== undefined) {

            // 直接将新记录添加到现有历史记录的前面
            this.calibrationRecordListForm.historical_information =
                newHistoryEntry + '|-|' + currentRow.historical_information;
          } else {
            // 如果没有历史记录，但当前记录有校准数据
            // 构建当前记录的校准数据
            const currentRecordEntry = [
              currentRow.calibration_result,
              currentRow.calibration_value,
              currentRow.calibration_date,
              currentRow.standard_value,
              currentRow.upper_tolerance,
              currentRow.lower_tolerance
            ].join('|%|');

            // 将新记录和当前记录组合
            this.calibrationRecordListForm.historical_information = newHistoryEntry + '|-|' + currentRecordEntry;
          }
        } else {
          // 如果当前记录没有校准数据，直接使用新记录
          // 如果有历史记录，将新记录添加到前面
          if (currentRow.historical_information &&
              currentRow.historical_information !== '' &&
              currentRow.historical_information !== null &&
              currentRow.historical_information !== undefined) {
            this.calibrationRecordListForm.historical_information =
                newHistoryEntry + '|-|' + currentRow.historical_information;
          } else {
            this.calibrationRecordListForm.historical_information = newHistoryEntry;
          }
        }
        this.$request.post('/editCalibrationRecordGoodProduct',this.calibrationRecordListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            this.$message.success('新增成功')
            //修改大表数据
            this.calibrationRecordData.splice(this.calibrationRecordListScope.$index,1,this.calibrationRecordListForm)
            this.filteredCalibrationRecordData=[...this.calibrationRecordData]
            //关闭窗口
            this.calibrationRecordListDialog=false
          }
        })
      }
    },
    //显示所有历史校准信息
    historicalInformationShow(scope){
      if (this.languageS==='chinese'){
        this.titleMessage='历史校准记录'
      }
      else if (this.languageS==='english'){
        this.titleMessage='Historical Calibration Information'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Историческая информация о калибровке'
      }
      // 保存当前行的scope和ID
      this.currentCalibrationScope = scope;
      this.currentCalibrationId = scope.row.id;
      // 初始化历史数据
      this.historicalInformation=[]
      if (scope.row.historical_information==='' || scope.row.historical_information===undefined || scope.row.historical_information===null){
        this.historicalInformation=[]
      }
      else {
        // 解析历史数据
        let items=scope.row.historical_information.split('|-|')
        this.historicalInformation=[]
        for (let i = 0; i < items.length; i++) {
          let content = items[i].split('|%|');
          // 历史数据格式：结果|%|值|%|日期|%|标准值|%|上公差|%|下公差
          this.historicalInformation.push({
            id: i, // 临时ID，用于前端操作
            calibration_result: content[0] || '',
            calibration_value: content[1] || '',
            calibration_date: content[2] || '',
            standard_value: content[3] || scope.row.standard_value,
            upper_tolerance: content[4] || scope.row.upper_tolerance,
            lower_tolerance: content[5] || scope.row.lower_tolerance,
            // 保存原始数据用于编辑
            originalData: content.join('|%|')
          });
        }
        // 按照 calibration_date 降序排序（最近的日期在上面）
        this.historicalInformation.sort((a, b) => {
          return new Date(b.calibration_date) - new Date(a.calibration_date);
        });
      }
      this.historicalInformationDialog=true
    },
    // 编辑历史记录行
    editHistoricalRow(row) {
      if (this.languageS==='chinese'){
        this.titleMessage='编辑历史校准记录'
      }
      else if (this.languageS==='english'){
        this.titleMessage='You are inserting one line of basic information of measuring tools'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Вы вставляете одну строку базовой информации измерительных инструментов'
      }
      // this.currentEditRow = { ...row };
      this.currentEditRow = JSON.parse(JSON.stringify(row));
      this.editHistoricalDialog = true;
    },

    // 删除历史记录行
    deleteHistoricalRow(row) {
      let confirmMessage = '';
      let confirmTitle = '';
      let confirmButton = '';
      let cancelButton = '';
      let cancelMessage = '';

      if (this.languageS === 'chinese') {
        confirmMessage = '确定要删除这条历史记录吗';
        confirmTitle = '提示';
        confirmButton = '确定';
        cancelButton = '取消';
        cancelMessage = '已取消删除';
      } else if (this.languageS === 'english') {
        confirmMessage = 'Are you sure you want to delete this historical record?';
        confirmTitle = 'Prompt';
        confirmButton = 'Confirm';
        cancelButton = 'Cancel';
        cancelMessage = 'Delete cancelled';
      } else if (this.languageS === 'russian') {
        confirmMessage = 'Вы уверены, что хотите удалить эту историческую запись?';
        confirmTitle = 'Подсказка';
        confirmButton = 'Подтвердить';
        cancelButton = 'Отменить';
        cancelMessage = 'Удаление отменено';
      }

      this.$confirm(confirmMessage, confirmTitle, {
        confirmButtonText: confirmButton,
        cancelButtonText: cancelButton,
        type: 'warning'
      }).then(() => {
        // 从历史数据中移除该行
        const index = this.historicalInformation.findIndex(item => item.id === row.id);
        if (index !== -1) {
          this.historicalInformation.splice(index, 1);
          // 重新构建历史数据字符串并保存
          this.saveHistoricalData();
        }
      }).catch(() => {
        this.$message.info(cancelMessage);
      });
    },

    // 保存编辑后的历史记录
    saveEdit() {
      const index = this.historicalInformation.findIndex(item => item.id === this.currentEditRow.id);
      if (index !== -1) {
        // 更新历史数据
        // this.historicalInformation[index] = {
        //   ...this.currentEditRow,
        //   id: this.currentEditRow.id // 保持原ID
        // };
        this.$set(this.historicalInformation, index, {
          ...this.currentEditRow
        });
        // 重新构建历史数据字符串并保存
        this.saveHistoricalData();
        this.editHistoricalDialog = false;
      }
    },

    // 保存历史数据到后端
    saveHistoricalData() {
      // 构建新的历史数据字符串
      // 格式：结果|%|值|%|日期|%|标准值|%|上公差|%|下公差
      let newHistoricalInfo = this.historicalInformation
          .map(item => [
            item.calibration_result,
            item.calibration_value,
            item.calibration_date,
            item.standard_value,
            item.upper_tolerance,
            item.lower_tolerance
          ].join('|%|'))
          .join('|-|');

      // 找到当前记录的所有数据
      const currentRecordIndex = this.calibrationRecordData.findIndex(item => item.id === this.currentCalibrationId);
      if (currentRecordIndex === -1) return;

      // 准备要保存的数据 - 包含所有字段，而不仅仅是历史信息
      const saveData = {
        ...this.calibrationRecordData[currentRecordIndex], // 保留所有原始字段
        historical_information: newHistoricalInfo // 更新历史信息字段
      };

      // 调用后端接口保存
      this.$request.post('/editCalibrationRecordGoodProduct', saveData).then(result => {
        if (result.code === 401) {
          this.$router.push('UserLogin');
          if (this.languageS==='chinese'){
            this.$message.error('您未登录，请登录')
          }
          else if (this.languageS==='english'){
            this.$message.error('You are not logged in, please log in')
          }
          else if (this.languageS==='russian'){
            this.$message.error('Вы не вошли в систему, пожалуйста, войдите')
          }
        } else {
          if (this.languageS==='chinese'){
            this.$message.success('保存成功')
          }
          else if (this.languageS==='english'){
            this.$message.success('Saved successfully')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Успешно сохранено')
          }
          // 更新主表数据中的历史信息
          this.$set(this.calibrationRecordData[currentRecordIndex], 'historical_information', newHistoricalInfo);
        }
      }).catch(error => {
        if (this.languageS==='chinese'){
          this.$message.error('保存失败')
        }
        else if (this.languageS==='english'){
          this.$message.error('Save failed')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Ошибка сохранения')
        }
        console.log(error)
      });
    },

    // 筛选原始数据表格
    handleFilterMeasuringToolCalibration() {
      // 如果没有原始数据，直接返回
      if (!this.calibrationRecordData || this.calibrationRecordData.length === 0) {
        this.filteredCalibrationRecordData = [];
        return;
      }
      // 筛选逻辑
      this.filteredCalibrationRecordData = this.calibrationRecordData.filter(item => {
        const matchesNumber = !this.number ||
            (item.number &&
                item.number.includes(this.number));

        return matchesNumber;
      });
      // 强制刷新表格（如果使用 :key 绑定）
      this.componentKey++;
    },
    // 重置筛选条件
    resetFilterMeasuringToolCalibration() {
      this.number = '';
      this.filteredCalibrationRecordData = [...this.calibrationRecordData]; // 恢复原始数据
      this.$request.post("/queryCalibrationRecordGoodProduct")
          .then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }else {
              this.calibrationRecordData=result.data
              this.filteredCalibrationRecordData=[...this.calibrationRecordData]
              for (let i = 0; i <this.filteredCalibrationRecordData.length; i++) {
                if (this.filteredCalibrationRecordData[i].calibration_date==='' || this.filteredCalibrationRecordData[i].calibration_date===undefined || this.filteredCalibrationRecordData[i].calibration_date===null){
                  this.filteredCalibrationRecordData[i].next_calibration_date="无上次校准记录"
                }
                else {
                  // 获取校准日期
                  let calibrationDate = new Date(this.filteredCalibrationRecordData[i].calibration_date);

                  // 加365天
                  calibrationDate.setDate(calibrationDate.getDate() + 365);

                  // 格式化为YYYY-MM-DD
                  const year = calibrationDate.getFullYear();
                  const month = String(calibrationDate.getMonth() + 1).padStart(2, '0');
                  const day = String(calibrationDate.getDate()).padStart(2, '0');
                  this.filteredCalibrationRecordData[i].next_calibration_date = `${year}-${month}-${day}`
                }
              }
            }
          })
      this.componentKey++; // 强制刷新表格
    },

    //———————————————————————————————————————————纠正预防——————————————————————————————————————————
    //显示编辑纠正预防的抽屉，doe 1：查看；2：编辑
    correctAndPreventEditShow(doe,scope){
      this.correctAndPreventDoe=doe
      this.correctAndPreventScope=scope
      //要对纠正预防进行查看
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在查看一条纠正预防措施'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are viewing one line of corrective and preventive action'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку коррективные и превентивные действия'
        }
        //给表单赋值
        this.correctAndPreventForm=_.cloneDeep(scope.row)
        //控制抽屉打开
        this.correctAndPreventDrawer=true
      }
      //要对纠正预防进行编辑
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条纠正预防措施'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of corrective and preventive action'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку коррективные и превентивные действия'
        }
        //给表单赋值
        this.correctAndPreventForm=_.cloneDeep(scope.row)
        //控制抽屉打开
        this.correctAndPreventDrawer=true
      }
    },

    // ——————————————————————————————————————————问题清单———————————————————————————————————————————
    // 显示编辑问题清单的弹窗，doe 1：编辑，2：删除；
    questionListEditShow(doe,scope){
      this.questionListDoe=doe
      this.questionListScope=scope
      //要对问题清单进行修改
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条问题清单'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of question list'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку cписок вопросов'
        }
        //给表单赋值
        this.questionListForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.questionListDialog=true
      }
    },
    // 点击编辑计量器具基本信息弹窗中的确定
    questionListOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.questionListForm.correct_person==='' || this.questionListForm.correct_person===null || this.questionListForm.correct_person===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"纠正人"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Who corrects"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Кто исправляет"')
        }
        return
      }
      if(this.questionListForm.correct_time==='' || this.questionListForm.correct_time===null || this.questionListForm.correct_time===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"纠正时间"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Correction time"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Время коррекции"')
        }
        return
      }

      //当编辑某一行时
      if (this.questionListDoe===1){
        this.$request.post('/editQuestionListGoodProduct',this.questionListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.questionListData.splice(this.questionListScope.$index,1,this.questionListForm)
            //关闭窗口
            this.questionListDialog=false
          }
        })
      }
    },

    //问题描述详情的弹窗
    questionDescriptionShow(row) {
      if (this.languageS==='chinese'){
        this.titleMessage='问题描述详情'
      }
      else if (this.languageS==='english'){
        this.titleMessage='Question Description'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Описание вопроса'
      }
      //组合数据
      if (row.question_description==="" || row.question_description===null || row.question_description===undefined){
        this.$message.error("数据有误")
      }
      else {
        const temp=row.question_description.split("：")
        this.questionList.question_description=temp[0]+temp[1]
        const tempList=temp[2].split(';')
        this.questionList.uncheckedMeasuringToolsNumber=[]
        for (let i = 0; i < tempList.length; i++) {
          //建一个变量，记录是否补签的
          let isSupply="NO"
          //查找是否补点检,去后段筛选是否有补点检记录，查的是根据点检时间等于某值和编号等于某值时的数据
          this.$request.post('/queryMeasuringToolChecklistTimeNumberGoodProduct',{
            number:tempList[i],
            date:row.generation_time+' 12:00:00'})
              .then(result=>{
                if (result.code === 401) {
                  this.$router.push('UserLogin')
                  alert("您未登录，请登录")
                }else {
                  if (result.data.length>0){
                    isSupply="YES"
                  }
                  const temp1={
                    number:tempList[i],
                    date:row.generation_time,
                    isSupply:isSupply
                  }
                  this.questionList.uncheckedMeasuringToolsNumber.push(temp1)
                }
              })

        }
        this.questionDescriptionDialog = true;
      }

    },
    //补点检的弹窗
    measuringToolsCheckSupplyShow(scope){
      if (this.languageS==='chinese'){
        this.titleMessage='补点检'
      }
      else if (this.languageS==='english'){
        this.titleMessage='Supplementary check'
      }
      else if (this.languageS==='russian'){
        this.titleMessage='Дополнительная проверка'
      }
      //组合点检记录表单
      //第一步：筛选出基本信息中名称及点检频次信息
      const nameAndFrequency=this.measuringToolsListData.filter(item=>item.number===scope.row.number)
      if (nameAndFrequency.length!==1){
        this.$message.error("数据出错")
        return
      }
      //组合补点检时间
      let time=scope.row.date+'T12:00:00'
      // const date=new Date(time);
      // date.setDate(date.getDate());
      // time=date.toISOString()
      this.measuringToolChecklistForm= {
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:time,
        //更新时间
        update_time:time,
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:this.useName,
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:0,

        //编号
        number:scope.row.number,
        //名称
        name:nameAndFrequency[0].name,
        //名称(英)
        name_english:nameAndFrequency[0].name_english,
        //名称(俄)
        name_russian:nameAndFrequency[0].name_russian,
        //规格型号
        specification:nameAndFrequency[0].specification,
        //点检频次
        inspection_frequency:nameAndFrequency[0].inspection_frequency,
        //是否合格
        is_qualified:'',
        //异常描述
        abnormal_description:'',
        //基本信息id
        basicInformationId:nameAndFrequency[0].id,
      }
      this.measuringToolsCheckSupplyDialog = true;
    },
    //点击补点检弹窗的确定
    measuringToolsCheckSupplyOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.measuringToolChecklistForm.is_qualified==='' || this.measuringToolChecklistForm.is_qualified===null || this.measuringToolChecklistForm.is_qualified===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"是否合格"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Is it qualified?"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Он квалифицирован?"')
        }
        return
      }
      //当插入一行时
      //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
      this.$request.post('/insertMeasuringToolChecklistGoodProduct',this.measuringToolChecklistForm).then(result=>{
        //如果未接收到数据，执行用户登录界面
        if (result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        //如果成功接收到数据，在控制台打印数据并提示插入成功
        else{
          if (this.languageS==='chinese'){
            this.$message.success('插入成功')
          }
          else if (this.languageS==='english'){
            this.$message.success('Insert successfully')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Успешно вставить')
          }
          //关闭窗口
          this.measuringToolsCheckSupplyDialog=false
        }
      })
    },

    //—————————————————————————————————————————工装技术条件————————————————————————————————————————————
    //显示编辑工装技术条件的弹窗，doe 1：添加，2：编辑；3：删除；
    fixtureTechnicalConditionEditShow(doe,scope){
      this.fixtureTechnicalConditionDoe=doe
      this.fixtureTechnicalConditionScope=scope
      //要对工装技术条件进行插入
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条工装技术条件'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of fixture technical condition'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку Техническое состояние крепления'
        }
        //对表单变量赋值，给一个空的
        this.fixtureTechnicalConditionForm={
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time: '',
          //逻辑删除
          sys_deleted:0,

          //设备名称
          equipment_name:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //设备型号
          equipment_model:'',
          //类别
          category:'',
          //类别_英
          category_english:'',
          //类别_俄
          category_russian:'',
          //工装名称
          fixture_name:'',
          //工装名称_英
          fixture_name_english:'',
          //工装名称_俄
          fixture_name_russian:'',
          //工装图纸编号
          drawing_number:'',
          //应用机型
          engine_model:'',
          //控制项目
          control_project:'',
          //控制项目_英
          control_project_english:'',
          //控制项目_俄
          control_project_russian:'',
          //评价/测量技术
          measurement_technique:'',
          //评价/测量技术_英
          measurement_technique_english:'',
          //评价/测量技术_俄
          measurement_technique_russian:'',
          //容量
          capacity:'',
          //频次
          frequency:'',
          //控制方法
          control_method:'',
          //控制方法_英
          control_method_english:'',
          //控制方法_俄
          control_method_russian:'',
          //责任部门
          department:'',
          //工装来源
          source:'',
        }
        //控制弹窗打开
        this.fixtureTechnicalConditionDialog=true
      }

      //对doe进行赋值，当等于2时，提示表头信息
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条工装技术条件'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of fixture technical condition'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку Техническое состояние крепления'
        }
        //给表单赋值
        this.fixtureTechnicalConditionForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.fixtureTechnicalConditionDialog=true
      }
    },
    //点击编辑工装技术条件弹窗中的确定
    fixtureTechnicalConditionOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.fixtureTechnicalConditionForm.equipment_name==='' || this.fixtureTechnicalConditionForm.equipment_name===null || this.fixtureTechnicalConditionForm.equipment_name===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.equipment_name_english==='' || this.fixtureTechnicalConditionForm.equipment_name_english===null || this.fixtureTechnicalConditionForm.equipment_name_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.equipment_name_russian==='' || this.fixtureTechnicalConditionForm.equipment_name_russian===null || this.fixtureTechnicalConditionForm.equipment_name_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.equipment_model==='' || this.fixtureTechnicalConditionForm.equipment_model===null || this.fixtureTechnicalConditionForm.equipment_model===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"设备型号"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Model"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Модель оборудования"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.category==='' || this.fixtureTechnicalConditionForm.category===null || this.fixtureTechnicalConditionForm.category===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"类别"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Category"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Категория_Китайский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.category_english==='' || this.fixtureTechnicalConditionForm.category_english===null || this.fixtureTechnicalConditionForm.category_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"类别_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Category_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Категория_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.category_russian==='' || this.fixtureTechnicalConditionForm.category_russian===null || this.fixtureTechnicalConditionForm.category_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"类别_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Category_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Категория_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.fixture_name==='' || this.fixtureTechnicalConditionForm.fixture_name===null || this.fixtureTechnicalConditionForm.fixture_name===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装名称"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Fixture Name"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название установки_Китайский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.fixture_name_english==='' || this.fixtureTechnicalConditionForm.fixture_name_english===null || this.fixtureTechnicalConditionForm.fixture_name_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装名称_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Fixture Name_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название установки_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.fixture_name_russian==='' || this.fixtureTechnicalConditionForm.fixture_name_russian===null || this.fixtureTechnicalConditionForm.fixture_name_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装名称_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Fixture Name_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название установки_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.drawing_number==='' || this.fixtureTechnicalConditionForm.drawing_number===null || this.fixtureTechnicalConditionForm.drawing_number===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装图纸编号"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Drawing Number"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Номер рисунка"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.engine_model==='' || this.fixtureTechnicalConditionForm.engine_model===null || this.fixtureTechnicalConditionForm.engine_model===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"应用机型"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Engine Model"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Модель двигателя"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_project==='' || this.fixtureTechnicalConditionForm.control_project===null || this.fixtureTechnicalConditionForm.control_project===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制项目"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Project"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект контроля_Китайский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_project_english==='' || this.fixtureTechnicalConditionForm.control_project_english===null || this.fixtureTechnicalConditionForm.control_project_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制项目_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Project_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект контроля_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_project_russian==='' || this.fixtureTechnicalConditionForm.control_project_russian===null || this.fixtureTechnicalConditionForm.control_project_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制项目_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Project_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект контроля_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.measurement_technique==='' || this.fixtureTechnicalConditionForm.measurement_technique===null || this.fixtureTechnicalConditionForm.measurement_technique===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"评价/测量技术"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Measurement Technique"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Техника измерения_Китайский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.measurement_technique_english==='' || this.fixtureTechnicalConditionForm.measurement_technique_english===null || this.fixtureTechnicalConditionForm.measurement_technique_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"评价/测量技术_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Measurement Technique_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Техника измерения_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.measurement_technique_russian==='' || this.fixtureTechnicalConditionForm.measurement_technique_russian===null || this.fixtureTechnicalConditionForm.measurement_technique_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"评价/测量技术_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Measurement Technique_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Техника измерения_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.measurement_type==='' || this.fixtureTechnicalConditionForm.measurement_type===null || this.fixtureTechnicalConditionForm.measurement_type===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"测量类型"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Measurement Type"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Тип измерения"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.capacity==='' || this.fixtureTechnicalConditionForm.capacity===null || this.fixtureTechnicalConditionForm.capacity===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"容量"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Capacity"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Емкость"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.frequency==='' || this.fixtureTechnicalConditionForm.frequency===null || this.fixtureTechnicalConditionForm.frequency===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"频次"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Frequency"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Частота"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_method==='' || this.fixtureTechnicalConditionForm.control_method===null || this.fixtureTechnicalConditionForm.control_method===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制方法"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Method"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Метод контроля_Китайский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_method_english==='' || this.fixtureTechnicalConditionForm.control_method_english===null || this.fixtureTechnicalConditionForm.control_method_english===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制方法_英"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Method_English"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Метод контроля_Aнглийский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.control_method_russian==='' || this.fixtureTechnicalConditionForm.control_method_russian===null || this.fixtureTechnicalConditionForm.control_method_russian===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"控制方法_俄"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Control Method_Russian"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Метод контроля_Русский"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.department==='' || this.fixtureTechnicalConditionForm.department===null || this.fixtureTechnicalConditionForm.department===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"责任部门"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Department"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Департамент"')
        }
        return
      }
      if(this.fixtureTechnicalConditionForm.source==='' || this.fixtureTechnicalConditionForm.source===null || this.fixtureTechnicalConditionForm.source===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装来源"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Source"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Источник"')
        }
        return
      }


      //当插入一行时
      if (this.fixtureTechnicalConditionDoe===1){
        //校验工装图纸编号是否唯一
        for (let i = 0; i < this.fixtureTechnicalConditionData.length; i++) {
          if (this.fixtureTechnicalConditionForm.drawing_number===this.fixtureTechnicalConditionData[i].drawing_number){
            this.$message.error("工装图纸编号重复，请修改")
            return;
          }
        }
        this.fixtureTechnicalConditionForm.id=this.generateUUIDv4()
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertFixtureTechConditionGoodProduct',this.fixtureTechnicalConditionForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            // 手动更新分页信息
            this.fixtureTechnicalConditionPagination.total += 1
            //修改大表数据
            //插入后自动跳转到最后一页，让用户可以看到自己插入的最新数据
            this.fixtureTechnicalConditionData.push(this.fixtureTechnicalConditionForm)
            //关闭窗口
            this.fixtureTechnicalConditionDialog=false
          }
        })
      }
      //当编辑某一行时
      else if (this.fixtureTechnicalConditionDoe===2){
        this.$request.post('/editFixtureTechConditionGoodProduct',this.fixtureTechnicalConditionForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.fixtureTechnicalConditionData.splice(this.fixtureTechnicalConditionScope.$index,1,this.fixtureTechnicalConditionForm)
            //重新读取点检表数据

            //关闭窗口
            this.fixtureTechnicalConditionDialog=false
          }
        })
      }
    },

    //辅助函数：查询工装技术条件的当前页数据
    async queryFixtureTechnicalConditionWithPagination(department) {
      const { currentPage, pageSize } = this.fixtureTechnicalConditionPagination;
      const response = await this.$request.post('/queryFixtureTechnicalConditionPaginationGoodProduct', {
        page: currentPage-1,
        size: pageSize,
        department: department
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.fixtureTechnicalConditionPagination.currentPage-1)*this.fixtureTechnicalConditionPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询工装技术条件条目总数
    async queryFixtureTechnicalConditionQuantity(department){
      const response = await this.$request.post('/queryFixtureTechnicalConditionQuantityGoodProduct', {
        department:department});
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    //处理每页显示条数的变化
    handleSizeChange(val) {
      this.fixtureTechnicalConditionPagination.pageSize = val;
      const department = this.selectTree === 1
          ? '产技/Product Technology/Технология продукции'
          : '装配/Assembly Workshop/Сборочная линия';
      this.queryFixtureTechnicalConditionWithPagination(department).then(data=>{
        this.fixtureTechnicalConditionData=data
      });
    },
    //处理选择哪页的变化
    handleCurrentChange(val) {
      this.fixtureTechnicalConditionPagination.currentPage = val;
      const department = this.selectTree === 1
          ? '产技/Product Technology/Технология продукции'
          : '装配/Assembly Workshop/Сборочная линия';
      this.queryFixtureTechnicalConditionWithPagination(department).then(data=>{
        this.fixtureTechnicalConditionData=data
      });
    },

    //辅助函数：查询工装技术条件表中某字段为某值的数据
    async queryFixtureTechnicalConditionOneField(fieldName, fieldValue){
      const result = await this.$request.post('/queryFixtureTechConditionOneFieldGoodProduct', {
        fieldName: fieldName,
        fieldVal: fieldValue,
      })
      if (result.code === 401) {
        // 未登录，跳转到登录页面并提示
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      // 成功，直接返回 result.data
      return result.data;
    },

    //辅助函数：查询工装技术条件表中两个字段为某值的数据
    async queryFixtureTechinicalConditionTwoFields(fieldName1, fieldValue1, fieldName2, fieldValue2){
      const result = await this.$request.post('/queryFixtureTechConditionTwoFieldsGoodProduct', {
        fieldName1: fieldName1,
        fieldValue1: fieldValue1,
        fieldName2: fieldName2,
        fieldValue2: fieldValue2
      })
      if (result.code === 401) {
        // 未登录，跳转到登录页面并提示
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      // 成功，直接返回 result.data
      return result.data;
    },

    //———————————————————————————————————————————工装台账——————————————————————————————————————————
    //显示编辑工装台账的弹窗，doe 1：添加，2：编辑；
    fixtureListEditShow(doe,scope){
      this.fixtureListDoe=doe
      this.fixtureListScope=scope
      //要对计工装台账进行插入
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条工装台账'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of fixture list'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку Список инструментов'
        }
        //对表单变量赋值，给一个空的
        this.fixtureListForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time: '',
          //逻辑删除
          sys_deleted:0,

          //车间
          workshop:'',
          //部门
          department:'',
          //机床名称
          equipment_name:'',
          //线体
          line:'',
          //工序或存放地点
          op:'',
          //检查项目
          measurement_project:'',
          //图纸编号
          drawing_number:'',
          //检查标准
          measurement_standard:'',
          //测量类型
          measurement_type:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //机型
          model:'',
          //评价测量技术
          measurement_technique:'',
          //周期
          cycle:'',
          //工装编号
          fixture_number:'',
        }
        //给自动翻译的变量赋值
        this.equipment_name_translate={zh:'', en:'', ru:''}
        this.measurement_project_translate={zh:'', en:'', ru:''}
        this.measurement_standard_translate={zh:'', en:'', ru:''}
        this.measurement_technique_translate={zh:'', en:'', ru:''}
        //控制弹窗打开
        this.fixtureListDialog=true
      }

      //对doe进行赋值，当等于2时，提示表头信息
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条工装台账'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of fixture list'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку Список инструментов'
        }
        //给表单赋值
        this.equipment_name_translate={
          zh:this.fixtureListScope.row.equipment_name.split('|*|')[0],
          en:this.fixtureListScope.row.equipment_name.split('|*|')[1],
          ru:this.fixtureListScope.row.equipment_name.split('|*|')[2]}
        this.measurement_project_translate={
          zh:this.fixtureListScope.row.measurement_project.split('|*|')[0],
          en:this.fixtureListScope.row.measurement_project.split('|*|')[1],
          ru:this.fixtureListScope.row.measurement_project.split('|*|')[2]}
        this.measurement_standard_translate={
          zh:this.fixtureListScope.row.measurement_standard.split('|*|')[0],
          en:this.fixtureListScope.row.measurement_standard.split('|*|')[1],
          ru:this.fixtureListScope.row.measurement_standard.split('|*|')[2]}
        this.measurement_technique_translate={
          zh:this.fixtureListScope.row.measurement_technique.split('|*|')[0],
          en:this.fixtureListScope.row.measurement_technique.split('|*|')[1],
          ru:this.fixtureListScope.row.measurement_technique.split('|*|')[2]}
        this.fixtureListForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.fixtureListDialog=true
      }
    },
    //点击编辑工装台账弹窗中的确定
    fixtureListOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.fixtureListForm.drawing_number==='' || this.fixtureListForm.drawing_number===null || this.fixtureListForm.drawing_number===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工装图纸编号"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Drawing Number"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Номер рисунка"')
        }
        return
      }
      if(this.fixtureListForm.workshop==='' || this.fixtureListForm.workshop===null || this.fixtureListForm.workshop===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"车间/科室"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "workshop/section"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Цех/Секция"')
        }
        return
      }
      if(this.fixtureListForm.line==='' || this.fixtureListForm.line===null || this.fixtureListForm.line===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"线体"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Line"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Линия"')
        }
        return
      }
      if(this.fixtureListForm.op==='' || this.fixtureListForm.op===null || this.fixtureListForm.op===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"工序/存放地点"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "op/location"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Операция/местоположение"')
        }
        return
      }
      //
      //当插入一行时
      if (this.fixtureListDoe===1){
        this.fixtureListForm.drawing_number=this.fixtureListForm.drawing_number.split('||')[0]
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertFixtureListGoodProduct',this.fixtureListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            //修改大表数据
            this.fixtureListData.push(this.fixtureListForm)
            //关闭窗口
            this.fixtureListDialog=false
          }
        })
      }
      //当编辑某一行时
      else if (this.fixtureListDoe===2){
        this.$request.post('/editFixtureListGoodProduct',this.fixtureListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.fixtureListData.splice(this.fixtureListScope.$index,1,this.fixtureListForm)
            //关闭窗口
            this.fixtureListDialog=false
          }
        })
      }
    },

    //监测新增或编辑工装台账弹窗中图号变化
    drawingNumberChange(newVal){
      if (newVal!=="" && newVal!==undefined && newVal!==null){
        let drawingNumber=newVal.split('||')[0]
        this.fixtureListForm.model=_.cloneDeep(newVal.split('||')[1])
        this.fixtureListForm.name=_.cloneDeep(newVal.split('||')[2])
        this.fixtureListForm.name_english=_.cloneDeep(newVal.split('||')[3])
        this.fixtureListForm.name_russian=_.cloneDeep(newVal.split('||')[4])
        //赋值工装编号
        let fixtureQuantity=this.fixtureListData.filter(item=>String(item.drawing_number)===String(drawingNumber))
        this.fixtureListForm.number=drawingNumber+'-'+String(fixtureQuantity.length+1)
      }
    },

    //辅助函数：查询工装台账的所有信息
    async queryFixtureListAll(){
      return this.$request.post('/queryFixtureListAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //将数据输出到页面表格中
          this.fixtureListData=result.data
          return result.data;
        }
      })
    },

    //辅助函数：查询工装台账表中某字段为某值的数据
    async queryFixtureListOneField(fieldName, fieldValue){
      const result = await this.$request.post('/queryFixtureListOneFieldGoodProduct', {
        fieldName: fieldName,
        fieldVal: fieldValue,
      })
      if (result.code === 401) {
        // 未登录，跳转到登录页面并提示
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
        throw new Error("未登录"); // 抛出错误，表明操作失败
      }
      // 成功，直接返回 result.data
      return result.data;
    },

    //自动翻译机床名称、检查项目、检查标准、评价/测量技术
    equipmentNameTranslate(val){
      this.fixtureListForm.equipment_name=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    measurementProjectTranslate(val){
      this.fixtureListForm.measurement_project=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    measurementStandardTranslate(val){
      this.fixtureListForm.measurement_standard=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    measurementTechniqueTranslate(val){
      this.fixtureListForm.measurement_technique=val.zh+'|*|'+val.en+'|*|'+val.ru
    },

    //——————————————————————————————————————————工装点检管理———————————————————————————————————————————
    //保存工装点检结果(产技)
    saveFixtureCheckResultProduct() {
      if(this.checkPerson==='' || this.checkPerson===null || this.checkPerson===undefined){
        if(this.languageS==='chinese'){
          this.$message.error('您未输入"点检人"，请输入')
        }
        else if(this.languageS==='english'){
          this.$message.error('Please enter the "Check person"')
        }
        else if(this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проверьте человека"')
        }
        return
      }
      //给后端发送的数据
      let fixtureChecklist=[]
      //过滤掉用户没有填写的行
      let filterFixtureChecklistData = this.fixtureChecklistData.filter(item =>
          (item.check_result !== null && item.check_result !== '' && item.check_result !== undefined) ||
          (item.check_value !== null && item.check_value !== '' && item.check_value !== undefined) ||
          (item.abnormal_description !== null && item.abnormal_description !== '' && item.abnormal_description !== undefined)
      );
      // 确保 check_time 是最新的（使用用户选择的时间或当前时间）
      const checkTime = this.selectedDateTime || this.formatDateTime(new Date());
      for (let i = 0; i < filterFixtureChecklistData.length ; i++) {
        //数据校验
        //如果点检结果为NO，异常描述未填，需校验
        if(filterFixtureChecklistData[i].check_result==='NO'&& (filterFixtureChecklistData[i].abnormal_description===null || filterFixtureChecklistData[i].abnormal_description==='' || filterFixtureChecklistData[i].abnormal_description===undefined)){
          if (this.languageS==='chinese'){
            this.$message.error('您未输入"异常描述"，请输入')
          }
          else if (this.languageS==='english'){
            this.$message.error('Please enter the "abnormal description"')
          }
          else if (this.languageS==='russian'){
            this.$message.error('Пожалуйста, введите "аномальное описание"')
          }
          return
        }
        //当测量类型为计量时，如果点检值未填写，需校验
        if(filterFixtureChecklistData[i].measurement_type==='计量/Record values/Запись числовое значение'){
          if(filterFixtureChecklistData[i].check_value===null || filterFixtureChecklistData[i].check_value==='' ||filterFixtureChecklistData[i].check_value===undefined){
            if (this.languageS==='chinese'){
              this.$message.error('您未输入"点检值"，请输入')
            }
            else if (this.languageS==='english'){
              this.$message.error('Please enter the "check value"')
            }
            else if (this.languageS==='russian'){
              this.$message.error('Пожалуйста, введите "проверить значение"')
            }
            return
          }
          //如果点检值不是数值，需校验
          else if (!this.isValidNumberStrict(filterFixtureChecklistData[i].check_value)){
            if (this.languageS==='chinese'){
              this.$message.error('点检值非数值，请修改')
            }
            else if (this.languageS==='english'){
              this.$message.error('The check value is not a numerical value, please modify it')
            }
            else if (this.languageS==='russian'){
              this.$message.error('Значение проверки не является цифровым значением, пожалуйста, измените его')
            }
            return
          }
        }
        //组合数据
        let temp={
          id:this.generateUUIDv4(),
          creator:this.useName+"/"+this.useId,
          sys_deleted:0,
          workshop:filterFixtureChecklistData[i].workshop,
          department:filterFixtureChecklistData[i].department,
          equipment_name:filterFixtureChecklistData[i].equipment_name,
          line:filterFixtureChecklistData[i].line,
          op:filterFixtureChecklistData[i].op,
          measurement_project:filterFixtureChecklistData[i].measurement_project,
          drawing_number:filterFixtureChecklistData[i].drawing_number,
          measurement_standard:filterFixtureChecklistData[i].measurement_standard,
          measurement_type:filterFixtureChecklistData[i].measurement_type,
          standard_value:filterFixtureChecklistData[i].standard_value,
          upper_tolerance:filterFixtureChecklistData[i].upper_tolerance,
          lower_tolerance:filterFixtureChecklistData[i].lower_tolerance,
          model:filterFixtureChecklistData[i].model,
          measurement_technique:filterFixtureChecklistData[i].measurement_technique,
          cycle:filterFixtureChecklistData[i].cycle,
          fixture_number:filterFixtureChecklistData[i].fixture_number,
          check_result:filterFixtureChecklistData[i].check_result,
          check_value:filterFixtureChecklistData[i].check_value,
          abnormal_description:filterFixtureChecklistData[i].abnormal_description,
          check_date:checkTime,
          check_shift:'',
          check_person:this.checkPerson,
          instruction_id:'',
        }
        fixtureChecklist.push(temp)
      }
      // 保存点检结果
      this.$request.post('/insertFixtureChecklistGoodProduct',fixtureChecklist).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          if (this.languageS==='chinese'){
            this.$message.success('点检结果保存成功')
          }
          else if (this.languageS==='english'){
            this.$message.success('Saved successfully')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Успешно сохранено')
          }

          // 保存成功后，重置时间选择器为当前时间
          const now = new Date();
          this.selectedDateTime = this.formatDateTime(now); // 更新 UI 显示的时间
          this.fixtureChecklistData.check_time = this.selectedDateTime; // 确保数据模型同步
        }
      });
      //保存结果后清空点检信息
      this.fixtureChecklistData.forEach(item => {
        item.check_result = '';
        item.check_value = '';
        item.check_shift = '';
        item.abnormal_description = '';
      });
      this.checkPerson=''
      this.selectedDateTime=this.formatDateTime(new Date())
    },

    //修改点检日期
    confirmDateTime(newDateTime) {
      if (newDateTime) {
        console.log("选择的日期时间:", newDateTime);
        // 更新 check_time 为新选择的日期
        this.fixtureChecklistData.check_time = newDateTime;
      } else {
        // 如果用户清空了选择器，可以恢复为当前时间或做其他处理
        const now = new Date();
        this.selectedDateTime = this.formatDateTime(now);
        this.fixtureChecklistData.check_time = this.selectedDateTime;
      }
    },

    //——————————————————————————————————————————油液基本信息———————————————————————————————————————————
    //显示编辑油液基本信息的弹窗，doe 1：添加，2：编辑；
    oilListEditShow(doe,scope){
      this.oilListDoe=doe
      this.oilListScope=scope
      //要对油液基本信息进行插入
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条油液基本信息'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of basic information of Oil&Liquid'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку базовой информации Название масла'
        }
        //对表单变量赋值，给一个空的
        this.oilListForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:0,

          //车间
          workshop:'',
          //线体
          line:'',
          //工序
          op:'',
          //机型
          model:'',
          //设备名称_中
          equipment_name_chinese:'',
          //设备名称_英
          equipment_name_english:'',
          //设备名称_俄
          equipment_name_russian:'',
          //油液名称_中
          oil_name_chinese:'',
          //油液名称_英
          oil_name_english:'',
          //油液名称_俄
          oil_name_russian:'',
          //规格型号
          specification:'',
          //折光系数
          refractive_index:'',
          //点检项目
          project:'',
          //点检要求
          requirement:'',
          //标准值
          standard_value:'',
          //上限
          upper_limit:'',
          //下限
          lower_limit:'',
          //点检频次
          inspection_frequency:'',
        }
        //控制弹窗打开
        this.oilListDialog=true
      }

      //对doe进行赋值，当等于2时，提示表头信息
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条油液基本信息'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of basic information of Oil&Liquid'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку базовой информации Название масла'
        }
        //给表单赋值
        this.oilListForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.oilListDialog=true
      }
    },
    //点击编辑油液基本信息弹窗中的确定
    oilListOk(){
      //数据校验：当用户有字段未输入内容时，提示未输入
      if(this.oilListForm.workshop==='' || this.oilListForm.workshop===null || this.oilListForm.workshop===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"车间"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Workshop"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Цех"')
        }
        return
      }
      if(this.oilListForm.line==='' || this.oilListForm.line===null || this.oilListForm.line===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"线体"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Line"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Линия"')
        }
        return
      }
      if(this.oilListForm.op==='' || this.oilListForm.op===null || this.oilListForm.op===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"工序"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "OP"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Операция"')
        }
        return
      }
      if(this.oilListForm.model==='' || this.oilListForm.model===null || this.oilListForm.model===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"应用机型"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Engine Model"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Модель двигателя"')
        }
        return
      }
      if(this.oilListForm.equipment_name_chinese==='' || this.oilListForm.equipment_name_chinese===null || this.oilListForm.equipment_name_chinese===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования_Китайский"')
        }
        return
      }
      if(this.oilListForm.equipment_name_english==='' || this.oilListForm.equipment_name_english===null || this.oilListForm.equipment_name_english===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称_英"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name_English"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования_Aнглийский"')
        }
        return
      }
      if(this.oilListForm.equipment_name_russian==='' || this.oilListForm.equipment_name_russian===null || this.oilListForm.equipment_name_russian===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"设备名称_俄"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Equipment Name_Russian"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название оборудования_Русский"')
        }
        return
      }
      if(this.oilListForm.oil_name_chinese==='' || this.oilListForm.oil_name_chinese===null || this.oilListForm.oil_name_chinese===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"油液名称"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Oil&Liquid Name"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название масла"')
        }
        return
      }
      if(this.oilListForm.oil_name_english==='' || this.oilListForm.oil_name_english===null || this.oilListForm.oil_name_english===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"油液名称_英"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Oil&Liquid Name_English"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название масла_Aнглийский"')
        }
        return
      }
      if(this.oilListForm.oil_name_russian==='' || this.oilListForm.oil_name_russian===null || this.oilListForm.oil_name_russian===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"油液名称_俄"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Oil&Liquid Name_Russian"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Название масла_Русский"')
        }
        return
      }
      if(this.oilListForm.specification==='' || this.oilListForm.specification===null || this.oilListForm.specification===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"规格型号"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Specification"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Спецификация"')
        }
        return
      }
      if(this.oilListForm.refractive_index==='' || this.oilListForm.refractive_index===null || this.oilListForm.refractive_index===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"折光系数"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Refractive Index"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Коэффициент преломления"')
        }
        return
      }
      if(this.oilListForm.project==='' || this.oilListForm.project===null || this.oilListForm.project===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"点检项目"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Project"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Проект"')
        }
        return
      }
      if(this.oilListForm.requirement==='' || this.oilListForm.requirement===null || this.oilListForm.requirement===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"点检要求"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Requirement"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Требования"')
        }
        return
      }
      if(this.oilListForm.standard_value==='' || this.oilListForm.standard_value===null || this.oilListForm.standard_value===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"标准值"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Standard Value"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Стандартное значение"')
        }
        return
      }
      if(this.oilListForm.upper_limit==='' || this.oilListForm.upper_limit===null || this.oilListForm.upper_limit===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"上限"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Upper Limit"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Верхний лимит"')
        }
        return
      }
      if(this.oilListForm.lower_limit==='' || this.oilListForm.lower_limit===null || this.oilListForm.lower_limit===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"下限"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Lower Limit"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Нижний лимит"')
        }
        return
      }
      if(this.oilListForm.inspection_frequency==='' || this.oilListForm.inspection_frequency===null || this.oilListForm.inspection_frequency===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未选择"点检频次"，请选择')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please select the "Inspection frequency"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, выберите "Частота проверки"')
        }
        return
      }

      //当插入一行时
      if (this.oilListDoe===1){
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertOilListGoodProduct',this.oilListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            //修改大表数据
            this.oilListData.push(this.oilListForm)
            //关闭窗口
            this.oilListDialog=false
          }
        })
      }
      //当编辑某一行时
      else if (this.oilListDoe===2){
        this.$request.post('/editOilListGoodProduct',this.oilListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.oilListData.splice(this.oilListScope.$index,1,this.oilListForm)

            //关闭窗口
            this.oilListDialog=false
          }
        })
      }
    },

    //辅助函数：查询油液基本信息的所有信息
    async queryOilListAll(){
      return this.$request.post('/queryOilListAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //将数据输出到页面表格中
          this.oilListData=result.data
        }
      })
    },

    //辅助函数：查询工油液基本信息表中三个字段为某值的数据
    async queryOilListThreeFields(fieldName1, fieldValue1, fieldName2, fieldValue2, fieldName3, fieldValue3){
      const result = await this.$request.post('/queryOilListThreeFieldsGoodProduct', {
        fieldName1: fieldName1,
        fieldValue1: fieldValue1,
        fieldName2: fieldName2,
        fieldValue2: fieldValue2,
        fieldName3: fieldName3,
        fieldValue3: fieldValue3
      })
      if (result.code === 401) {
        // 未登录，跳转到登录页面并提示
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      // 成功，直接返回 result.data
      return result.data;
    },

    //——————————————————————————————————————————油液点检管理———————————————————————————————————————————
    // 油液点检管理中tree点击事件
    handleOilCheckTreeClick(data, node) {
      this.currentTreeNode = { data, node };

      // 获取父节点信息来判断是缸体线还是缸盖线
      let workshop = '';
      let line = '';
      let op = data.label; // 当前点击的节点标签就是OP工序

      // 根据父节点判断线体信息
      if (node.parent && node.parent.data) {
        const parentLabel = node.parent.data.label;
        if (parentLabel === 'Cylinder block') {
          workshop = '机加/Machining Workshop/Обработки линия';
          line = '缸体线/Cylinder block line/линия блока цилиндров';
        } else if (parentLabel === 'Cylinder head') {
          workshop = '机加/Machining Workshop/Обработки линия';
          line = '缸盖线/Cylinder head line/линия головки блока цилиндров';
        }
      }
      if (workshop && line && op) {
        if (this.activeNameManufacturingOil==='oilInspectionManagement'){
          this.queryOilDataByOp(workshop,line,op)
        }
        else if (this.activeNameManufacturingOil==='oilTrendManagement'){
          this.queryOilProjectByOp(workshop,line,op)
        }
      }
    },

    // 根据工序查询油液基本信息
    async queryOilDataByOp(workshop, line, op) {
      try {
        const result = await this.queryOilListThreeFields('workshop', workshop, 'line', line, 'op', op);

        if (result && result.length > 0) {
          this.originalOilData = result;
          this.groupOilDataByEquipment();

          if (this.groupedOilData.length > 0) {
            this.showFirstDevice();
            this.$message.closeAll();
            setTimeout(() => {
              this.$message.success(`找到${this.groupedOilData.length}台设备需要点检，开始第一台设备的点检`);
            }, 100);
          } else {
            this.$message.warning('没有找到有效的设备数据');
            this.clearOilCheckData();
          }
        } else {
          this.$message.warning(`在${workshop} - ${line} - ${op}下没有找到油液基本信息`);
          this.clearOilCheckData();
        }
      } catch (error) {
        this.$message.closeAll();
        console.error('查询油液基本信息失败:', error);
        this.$message.error('查询数据失败');
      }
    },

    // 按设备分组油液数据
    groupOilDataByEquipment() {
      const grouped = {};
      this.originalOilData.forEach(item => {
        // 使用设备名称作为分组键
        const equipmentKey = item.equipment_name_chinese;

        if (!grouped[equipmentKey]) {
          grouped[equipmentKey] = {
            equipment_name_chinese: item.equipment_name_chinese,
            equipment_name_english: item.equipment_name_english,
            equipment_name_russian: item.equipment_name_russian,
            oil_name_chinese: item.oil_name_chinese,
            oil_name_english: item.oil_name_english,
            oil_name_russian: item.oil_name_russian,
            specification: item.specification,
            refractive_index: item.refractive_index,
            workshop: item.workshop,
            line: item.line,
            op: item.op,
            model:item.model,
            items: [] // 该设备的所有点检项目
          };
        }

        // 添加点检项目
        grouped[equipmentKey].items.push({
          id: item.id,
          project: item.project,
          requirement: item.requirement,
          standard_value: item.standard_value,
          upper_limit: item.upper_limit,
          lower_limit: item.lower_limit,
          inspection_frequency: item.inspection_frequency,
          oil_basic_information_id: item.id,
          actual_value: '', // 实测值 - 初始为空
          abnormal_description: '', // 异常描述 - 初始为空
          check_person: '', // 点检人 - 初始为空
          check_date: '', // 点检日期 - 初始为空
          check_shift: '' // 点检班次 - 初始为空
        });
      });
      this.groupedOilData = Object.values(grouped);
    },

    // 显示第一台设备的数据
    showFirstDevice() {
      this.currentDeviceIndex = 0;
      this.displayCurrentDeviceData();
    },

    // 显示当前设备的数据
    displayCurrentDeviceData() {
      if (this.currentDeviceIndex >= 0 && this.currentDeviceIndex < this.groupedOilData.length) {
        const currentDevice = this.groupedOilData[this.currentDeviceIndex];

        // 清空现有数据
        this.oilChecklistData = [];

        // 为当前设备的每个点检项目创建数据行
        currentDevice.items.forEach((item, index) => {
          this.oilChecklistData.push({
            ...item,
            // 设备基本信息
            equipment_name_chinese: currentDevice.equipment_name_chinese,
            equipment_name_english: currentDevice.equipment_name_english,
            equipment_name_russian: currentDevice.equipment_name_russian,
            oil_name_chinese: currentDevice.oil_name_chinese,
            oil_name_english: currentDevice.oil_name_english,
            oil_name_russian: currentDevice.oil_name_russian,
            specification: currentDevice.specification,
            refractive_index: currentDevice.refractive_index,
            // 层级信息
            workshop: currentDevice.workshop,
            line: currentDevice.line,
            op: currentDevice.op,
            model: currentDevice.model,
            // 序号
            order: index + 1
          });
        });
        this.$message.success(`当前点检设备: ${currentDevice.equipment_name_chinese} (${this.currentDeviceIndex + 1}/${this.groupedOilData.length})`);

        // 强制更新视图
        this.$forceUpdate();
      } else {
        console.error('设备索引超出范围:', this.currentDeviceIndex);
        this.$message.error('设备数据加载失败');
      }
    },

    // 检查日期是否符合频次要求
    isDateValidForFrequency(frequency, checkDate) {
      if (!frequency || !checkDate) return false;

      const rule = this.frequencyRules[frequency];
      if (!rule) return true; // 如果没有规则，默认允许

      if (rule.enabledDays === 'all') return true;

      // 获取星期几 (0=周日, 1=周一, ..., 6=周六)
      const dayOfWeek = new Date(checkDate).getDay();
      // 转换为周一=1, 周日=7的格式
      const normalizedDay = dayOfWeek === 0 ? 7 : dayOfWeek;

      return rule.enabledDays.includes(normalizedDay);
    },
    //校验输入是否为数值
    isValidNumberStrict(value) {
      // 排除 null、undefined、空字符串
      if (value === null || value === undefined || value === '') return false;

      // 转换为字符串（防止 Number 类型直接通过）
      const strValue = String(value).trim();

      // 正则表达式：可选正负号 + 数字 + 可选小数点 + 数字
      const regex = /^[-+]?\d*\.?\d+$/;

      return regex.test(strValue);
    },
    // 点检日期变化事件
    handleCheckDateChange() {
      // 日期变化时重新验证所有行的禁用状态
      this.$forceUpdate();
    },

    // 判断字段是否禁用
    isFieldDisabled(item, fieldName) {
      if (fieldName !== 'actual_value') return false;

      const frequency = item.inspection_frequency;
      const checkDate = this.oilCheckInfoData[0]?.check_date;

      if (!frequency || !checkDate) return true;

      return !this.isDateValidForFrequency(frequency, checkDate);
    },

    // 获取实测值输入框的占位符文本
    getActualValuePlaceholder(item) {
      const frequency = item.inspection_frequency;
      const checkDate = this.oilCheckInfoData[0]?.check_date;

      if (!frequency || !checkDate) {
        return this.languageS === 'chinese' ? '先选择日期' : 'select date';
      }

      if (this.isFieldDisabled(item, 'actual_value')) {
        const rule = this.frequencyRules[frequency];
        if (rule && rule.enabledDays !== 'all') {
          return this.languageS === 'chinese' ? '-' : '-';
        }
      }

      return this.languageS === 'chinese' ? '请输入' : 'enter';
    },
    // 初始化油液点检默认值（点检人、日期和班次）
    initOilCheckDefault() {
      const today = new Date();
      const formattedDate = today.toISOString().split('T')[0];

      this.oilCheckInfoData = [{
        check_person: this.useName,
        check_date: formattedDate,
        check_shift: '早班/morning Shift/Ранняя смена'
      }];
    },

    // 验证当前设备数据
    validateCurrentDeviceData() {
      const currentData = this.oilChecklistData;
      const checkInfo = this.oilCheckInfoData[0];

      if (!currentData || currentData.length === 0) {
        this.$message.warning('没有可点检的数据');
        return false;
      }

      // 检查点检人
      if (!checkInfo.check_person) {
        this.$message.warning('请填写点检人');
        return false;
      }

      // 检查点检日期
      if (!checkInfo.check_date) {
        this.$message.warning('请选择点检日期');
        return false;
      }

      // 检查点检班次
      if (!checkInfo.check_shift) {
        this.$message.warning('请选择点检班次');
        return false;
      }

      // 检查实测值是否填写（根据频次规则）
      for (let i = 0; i < currentData.length; i++) {
        const item = currentData[i];
        const frequency = item.inspection_frequency;
        const rule = this.frequencyRules[frequency];

        // 如果有规则且需要值，且日期符合要求，则必须填写
        if (rule && rule.requireValue &&
            this.isDateValidForFrequency(frequency, checkInfo.check_date)) {

          if (!item.actual_value && item.actual_value !== 0) {
            this.$message.warning(`请填写第${i + 1}项的点检实测值`);
            return false;
          }

          // 检查是否为有效数值
          if (!this.isValidNumberStrict(item.actual_value)) {
            if (this.languageS === 'chinese') {
              this.$message.error('点检值非数值，请修改');
            } else if (this.languageS === 'english') {
              this.$message.error('The check value is not a numerical value, please modify it');
            } else if (this.languageS === 'russian') {
              this.$message.error('Значение проверки не является цифровым значением, пожалуйста, измените его');
            }
            return false;
          }
        }
      }

      return true;
    },
    // 为下一台设备清空信息（保留点检人、日期和班次）
    clearCheckInfoForNextDevice() {
      // 保留点检人、日期和班次
      const checkPerson = this.oilCheckInfoData[0].check_person;
      const checkDate = this.oilCheckInfoData[0].check_date;
      const checkShift = this.oilCheckInfoData[0].check_shift;
      this.oilCheckInfoData[0] = {
        check_person: checkPerson,
        check_date: checkDate,
        check_shift: checkShift
      };

      // 清空每行的实测值和异常描述
      if (this.oilChecklistData && this.oilChecklistData.length > 0) {
        this.oilChecklistData.forEach(item => {
          item.actual_value = '';
          item.abnormal_description = '';
        });
      }
    },

    // 保存油液点检结果
    async saveOilCheckResult() {
      try {
        // 验证必填字段
        if (!this.validateCurrentDeviceData()) {
          return;
        }
        // 获取点检信息（从第一行获取）
        const checkInfo = this.oilCheckInfoData[0];

        // 准备提交数据
        const submitData = this.oilChecklistData
            //过滤掉实测值为空的行
            .filter(item => item.actual_value !== '' && item.actual_value !== null && item.actual_value !== undefined)
            .map(item => ({
              // 基础信息
              id: this.generateUUIDv4(),
              creator: this.useName + "/" + this.useId,
              sys_deleted: 0,

              // 设备信息
              workshop: item.workshop,
              line: item.line,
              op: item.op,
              model: item.model,
              equipment_name_chinese: item.equipment_name_chinese,
              equipment_name_english: item.equipment_name_english,
              equipment_name_russian: item.equipment_name_russian,
              oil_name_chinese: item.oil_name_chinese,
              oil_name_english: item.oil_name_english,
              oil_name_russian: item.oil_name_russian,
              specification: item.specification,
              refractive_index: item.refractive_index,

              // 点检项目信息
              project: item.project,
              requirement: item.requirement,
              standard_value: item.standard_value,
              upper_limit: item.upper_limit,
              lower_limit: item.lower_limit,
              inspection_frequency: item.inspection_frequency,
              oil_basic_information_id: item.oil_basic_information_id,

              // 点检结果
              actual_value: item.actual_value,
              abnormal_description: item.abnormal_description,

              // 点检信息
              check_person: checkInfo.check_person,
              check_date: checkInfo.check_date,
              check_shift: checkInfo.check_shift
            }));

        // 插入记录
        const result = await this.$request.post('/insertOilChecklistGoodProduct', submitData);

        // 根据实际返回的code进行判断
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.warning("您未登录，请登录");
          return;
        }

        // 判断code为1表示成功
        if (result.code === 1) {
          this.$message.success(`第${this.currentDeviceIndex + 1}台设备点检结果保存成功`);

          // 检查是否还有下一台设备
          if (this.currentDeviceIndex < this.groupedOilData.length - 1) {
            // 切换到下一台设备
            this.currentDeviceIndex++;
            this.clearCheckInfoForNextDevice();

            // 短暂延迟后显示下一台设备数据
            setTimeout(() => {
              this.displayCurrentDeviceData();
            }, 500);
          } else {
            this.$message.success('所有设备点检完成！');
            setTimeout(() => {
              this.clearOilCheckData();
            }, 1000);
          }
        } else {
          // 使用服务器返回的错误信息
          const errorMsg = result.msg || result.message || '未知错误';
          this.$message.error('保存失败: ' + errorMsg);
        }
      } catch (error) {
        console.error('保存点检结果失败:', error);
        this.$message.error('保存失败: ' + (error.message || '网络错误'));
      }
    },

    // 清空点检数据
    clearOilCheckData() {
      // 获取当前日期
      const today = new Date();
      const formattedDate = today.toISOString().split('T')[0]; // 格式化为 YYYY-MM-DD
      // 清空表格数据
      this.oilChecklistData = [{
        equipment_name_chinese: '',
        equipment_name_english: '',
        equipment_name_russian: '',
        oil_name_chinese: '',
        oil_name_english: '',
        oil_name_russian: '',
        specification: '',
        refractive_index: '',
        project: '',
        requirement: '',
        standard_value: '',
        upper_limit: '',
        lower_limit: '',
        inspection_frequency: '',
        actual_value: '',
        abnormal_description: ''
      }];

      // 设置默认点检信息
      this.oilCheckInfoData = [{
        check_person: this.useName || '',
        check_date: formattedDate,
        check_shift: '早班/morning Shift/Ранняя смена'
      }];

      this.originalOilData = [];
      this.groupedOilData = [];
      this.currentDeviceIndex = -1;
      this.currentTreeNode = null;
    },

    // 取消按钮事件
    cancelOilCheck() {
      this.$confirm('确定取消当前点检吗？未保存的数据将丢失。', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.clearOilCheckData();
        this.$message.info('已取消点检');
      });
    },

    //———————————————————————————————————————————油液历史点检数据——————————————————————————————————————————
    // 处理筛选条件
    handleFilter() {
      // 构建筛选参数
      const filterParams = {};

      // 只添加非空的筛选条件
      if (this.oil_equipment_name) {
        filterParams.fieldName1 = 'oil_equipment_name';
        filterParams.fieldValue1 = this.oil_equipment_name;
      }
      if (this.oil_name) {
        filterParams.fieldName2 = 'oil_name';
        filterParams.fieldValue2 = this.oil_name;
      }
      if (this.project) {
        filterParams.fieldName3 = 'project';
        filterParams.fieldValue3 = this.project;
      }
      if (this.line) {
        filterParams.fieldName4 = 'line';
        filterParams.fieldValue4 = this.line;
      }
      if (this.op) {
        filterParams.fieldName5 = 'op';
        filterParams.fieldValue5 = this.op;
      }
      if (this.check_date) {
        filterParams.fieldName6 = 'check_date';
        filterParams.fieldValue6 = this.check_date;
      }
      if (this.check_person) {
        filterParams.fieldName7 = 'check_person';
        filterParams.fieldValue7 = this.check_person;
      }
      if (this.check_shift) {
        filterParams.fieldName8 = 'check_shift';
        filterParams.fieldValue8 = this.check_shift;
      }

      // 如果有筛选条件，调用后端接口
      if (Object.keys(filterParams).length > 0) {
        this.isOilHistoricalDataFiltered = true;
        this.currentOilFilterParams = filterParams;
        this.queryFilteredOilHistoricalData(filterParams);
      } else {
        // 如果没有筛选条件，恢复显示分页数据
        this.resetFilter();
      }
    },
    // 去后端查询筛选后的数据（分页）
    async queryFilteredOilHistoricalData(filterParams) {
      const { currentPage, pageSize } = this.oilHistoricalDataPagination;

      const queryParams = {
        ...filterParams,
        page: currentPage - 1,  // 后端从0开始
        size: pageSize
      };

      const result = await this.$request.post('/queryOilHistoricalDataByDynamicConditionsProblemManagementNew', queryParams);
      if (result.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
        return;
      }

      // 更新数据和分页信息
      this.filteredOilHistoricalData = result.data.data;
      this.oilHistoricalDataPagination.total = result.data.total;

      // 为数据添加序号
      for (let i = 0; i < this.filteredOilHistoricalData.length; i++) {
        this.filteredOilHistoricalData[i].indexUse = (currentPage - 1) * pageSize + i + 1;
      }

      this.componentKey++;
    },
    // 重置筛选条件
    async resetFilter() {
      this.oil_equipment_name = '';
      this.oil_name = '';
      this.project = '';
      this.line = '';
      this.op = '';
      this.check_date = '';
      this.check_person = '';
      this.check_shift = '';

      this.isOilHistoricalDataFiltered = false;
      this.currentOilFilterParams = null;

      // 重新加载分页数据
      this.oilHistoricalDataPagination.currentPage = 1;
      let workshop = '机加/Machining Workshop/Обработки линия';
      const data = await this.queryOilHistoricalDataWithPagination(workshop);
      this.oilHistoricalData = data;
      this.filteredOilHistoricalData = [...this.oilHistoricalData];

      // 获取总数
      const total = await this.queryOilHistoricalDataQuantity(workshop);
      this.oilHistoricalDataPagination.total = total;

      this.componentKey++; // 强制刷新表格
    },

    //显示编辑油液点检记录的弹窗，doe 1：编辑；
    historicalDataEditShow(doe,scope){
      this.oilChecklistDoe=doe
      this.oilChecklistScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条油液点检记录'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of historical data'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку Исторические данные'
        }
        //给表单赋值
        this.oilChecklistForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.oilChecklistDialog=true
      }
    },
    //点击编辑油液点检记录弹窗中的确定
    oilChecklistOk(){
      //当编辑某一行时
      if (this.oilChecklistDoe===1){
        this.$request.post('/editOilChecklistGoodProduct',this.oilChecklistForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.oilChecklistData.splice(this.oilChecklistScope.$index,1,this.oilChecklistForm)
            // 更新 filteredOilHistoricalData 中对应的行
            const indexInFiltered = this.filteredOilHistoricalData.findIndex(item =>
                item.id === this.oilChecklistForm.id // 使用唯一标识符匹配
            );
            if (indexInFiltered !== -1) {
              this.filteredOilHistoricalData.splice(indexInFiltered, 1, this.oilChecklistForm);
            }

            //关闭窗口
            this.oilChecklistDialog=false
          }
        })
      }
    },

    //辅助函数：查询油液历史点检数据的当前页数据
    async queryOilHistoricalDataWithPagination(workshop) {
      const { currentPage, pageSize } = this.oilHistoricalDataPagination;
      const response = await this.$request.post('/queryOilHistoricalDataPaginationGoodProduct', {
        page: currentPage-1,
        size: pageSize,
        workshop: workshop
      });
      console.log(response,'确认输出')
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.oilHistoricalDataPagination.currentPage-1)*this.oilHistoricalDataPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询油液历史点检数据条目总数
    async queryOilHistoricalDataQuantity(workshop){
      const response = await this.$request.post('/queryOilHistoricalDataQuantityGoodProduct', {
        workshop:workshop});
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    // 处理每页显示条数的变化
    handleSizeChangeOilHistoricalData(val) {
      this.oilHistoricalDataPagination.pageSize = val;
      this.oilHistoricalDataPagination.currentPage = 1;

      if (this.isOilHistoricalDataFiltered && this.currentOilFilterParams) {
        // 如果当前在筛选状态，使用筛选条件重新查询
        this.queryFilteredOilHistoricalData(this.currentOilFilterParams);
      } else {
        // 否则查询所有数据
        let workshop = '机加/Machining Workshop/Обработки линия';
        this.queryOilHistoricalDataWithPagination(workshop).then(data => {
          this.oilHistoricalData = data;
          this.filteredOilHistoricalData = [...this.oilHistoricalData];
        });
      }
    },
    // 处理选择哪页的变化
    handleCurrentChangeOilHistoricalData(val) {
      this.oilHistoricalDataPagination.currentPage = val;

      if (this.isOilHistoricalDataFiltered && this.currentOilFilterParams) {
        // 如果当前在筛选状态，使用筛选条件重新查询
        this.queryFilteredOilHistoricalData(this.currentOilFilterParams);
      } else {
        // 否则查询所有数据
        let workshop = '机加/Machining Workshop/Обработки линия';
        this.queryOilHistoricalDataWithPagination(workshop).then(data => {
          this.oilHistoricalData = data;
          this.filteredOilHistoricalData = [...this.oilHistoricalData];
        });
      }
    },

    //查询所有油液历史点检数据
    async queryOilHistoricalDataAll(){
      return this.$request.post('/queryOilHistoricalDataAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          return result.data
        }
      })
    },
    //导出所有油液历史点检数据
    async exportOilHistoricalData() {
      let loading = null;
      try {
        loading = this.$loading({
          lock: true,
          text: '正在导出油液历史点检数据...',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });

        const allData = await this.queryOilHistoricalDataAll();

        if (!allData || allData.length === 0) {
          this.$message.warning('没有数据可导出');
          loading.close();
          return;
        }

        // 准备导出数据 - 中英文列名
        const exportData = allData.map((item, index) => ({
          '序号/No': index + 1,
          '创建时间/Create Time': this.formatDateTime1(item.create_time),
          '更新时间/Update Time': this.formatDateTime1(item.update_time),
          '创建人/Creator': item.creator || '',
          '车间/Workshop': item.workshop || '',
          '线体/Line': item.line || '',
          '工序/Operation': item.op || '',
          '机型/Model': item.model || '',
          '设备名称(中文)/Equipment Name(CN)': item.equipment_name_chinese || '',
          '设备名称(英文)/Equipment Name(EN)': item.equipment_name_english || '',
          '设备名称(俄文)/Equipment Name(RU)': item.equipment_name_russian || '',
          '油液名称(中文)/Oil Name(CN)': item.oil_name_chinese || '',
          '油液名称(英文)/Oil Name(EN)': item.oil_name_english || '',
          '油液名称(俄文)/Oil Name(RU)': item.oil_name_russian || '',
          '规格型号/Specification': item.specification || '',
          '折光系数/Refractive Index': item.refractive_index || '',
          '点检项目/Inspection Project': item.project || '',
          '点检要求/Requirement': item.requirement || '',
          '标准值/Standard Value': item.standard_value || '',
          '上限/Upper Limit': item.upper_limit || '',
          '下限/Lower Limit': item.lower_limit || '',
          '点检频次/Inspection Frequency': item.inspection_frequency || '',
          '实测值/Actual Value': item.actual_value || '',
          '异常描述/Abnormal Description': item.abnormal_description || '',
          '点检人/Check Person': item.check_person || '',
          '点检日期/Check Date': this.formatDateTime1(item.check_date),
          '点检班次/Check Shift': item.check_shift || '',
        }));

        const workbook = XLSX.utils.book_new();
        const worksheet = XLSX.utils.json_to_sheet(exportData);

        // 设置列宽
        const colWidth = [
          { wch: 8 },    // 序号/No
          { wch: 18 },   // 创建时间/Create Time
          { wch: 18 },   // 更新时间/Update Time
          { wch: 12 },   // 创建人/Creator
          { wch: 12 },   // 车间/Workshop
          { wch: 12 },   // 线体/Line
          { wch: 12 },   // 工序/Operation
          { wch: 15 },   // 机型/Model
          { wch: 20 },   // 设备名称(中文)/Equipment Name(CN)
          { wch: 20 },   // 设备名称(英文)/Equipment Name(EN)
          { wch: 20 },   // 设备名称(俄文)/Equipment Name(RU)
          { wch: 15 },   // 油液名称(中文)/Oil Name(CN)
          { wch: 15 },   // 油液名称(英文)/Oil Name(EN)
          { wch: 15 },   // 油液名称(俄文)/Oil Name(RU)
          { wch: 15 },   // 规格型号/Specification
          { wch: 12 },   // 折光系数/Refractive Index
          { wch: 20 },   // 点检项目/Inspection Project
          { wch: 20 },   // 点检要求/Requirement
          { wch: 12 },   // 标准值/Standard Value
          { wch: 12 },   // 上限/Upper Limit
          { wch: 12 },   // 下限/Lower Limit
          { wch: 15 },   // 点检频次/Inspection Frequency
          { wch: 12 },   // 实测值/Actual Value
          { wch: 25 },   // 异常描述/Abnormal Description
          { wch: 12 },   // 点检人/Check Person
          { wch: 12 },   // 点检日期/Check Date
          { wch: 12 },   // 点检班次/Check Shift
        ];
        worksheet['!cols'] = colWidth;

        XLSX.utils.book_append_sheet(workbook, worksheet, 'OilHistoricalData');
        const fileName = `OilHistoricalData_${new Date().toISOString().split('T')[0]}.xlsx`;
        XLSX.writeFile(workbook, fileName);

        this.$message.success(`导出成功，共 ${allData.length} 条记录`);
        loading.close();
      } catch (error) {
        console.error('导出失败:', error);
        this.$message.error('导出失败: ' + (error.message || '未知错误'));
        if (loading) loading.close();
      }
    },
    //格式化日期时间
    formatDateTime1(value) {
      if (!value) return '';
      // 如果是时间戳
      if (typeof value === 'number') {
        return new Date(value).toLocaleString();
      }
      // 如果是日期字符串
      const date = new Date(value);
      return isNaN(date.getTime()) ? value : date.toLocaleString();
    },

    //———————————————————————————————————————————油液趋势管理——————————————————————————————————————————
    //查询该工序下检测项目
    queryOilProjectByOp(workshop,line,op){
      this.$request.post("/queryOilListThreeFieldsGoodProduct",{
        fieldName1: "workshop",
        fieldValue1: workshop,
        fieldName2: "line",
        fieldValue2: line,
        fieldName3: "op",
        fieldValue3: op
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.error("您未登录，请登录");
        }
        else {
          //将数据输出到页面表格中
          this.oilTrendlistData=result.data
        }
      })
    },
    //画图
    changeDataQuantity(quantity, oil_basic_information_id){
      this.$request.post("/queryOilProjectByOneFieldGoodProduct",{
        quantity: quantity,
        oil_basic_information_id: oil_basic_information_id,
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.error("您未登录，请登录");
        }
        else {
          //用户可能想看到参与计算的原始数据，那么直接把筛选出来的数据给了原始数据
          //给直方图准备的测量值
          let testValues=[]
          //折线图
          let optionLine={
            title:{
              //设置标题的样式
              textStyle:{
                color:'red',
              },
              //设置标题的居中方式（水平）
              x:'center',
              text:'暂未选择',
            },
            xAxis:{
              data:[]
            },
            yAxis:{
              type: 'value',
              min:0, // 设置y轴的最小值
              max:100,//设置y轴的最大值
            },
            series:[
              {
                //设置系列，设置当前映射出的图形
                name:'valueUse',
                type:'line',
                stack:'num',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'standard',
                type:'line',
                stack:'standard',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'ceiling',
                type:'line',
                stack:'ceiling',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'lower',
                type:'line',
                stack:'lower',
                data:[]
              },],
            grid: {
              top:'15%',
              left: '2%', // 图表内容距离容器左侧的距离
              right: '2%', // 图表内容距离容器右侧的距离
              bottom: '10%', // 图表内容距离容器底部的距离，可以适当增加这个值来留出更多空间给标题
              containLabel: true, // 网格是否包含坐标轴的标签在内
            },
            tooltip:{
              //触发类型
              trigger:'axis',
              //设置坐标轴的指示器
              axisPointer:{
                type: 'cross'
              },
            },
            // 添加 toolbox 配置
            toolbox: {
              feature: {
                saveAsImage: {
                  title: '下载图表', // 按钮提示文字
                  type: 'png', // 默认保存为 png 格式
                  pixelRatio: 2 // 图片分辨率比例，默认为1
                }
              },
              right: 5, // 工具箱位置，距离右侧20px
              top: 0 // 工具箱位置，距离顶部20px
            }
          }
          if (result.data.length>1){
            //为使图表的x轴日期从小到大，采取倒循环
            for (let i = result.data.length-1; i >= 0; i--) {
              testValues.push(Number(result.data[i].actual_value))
              optionLine.xAxis.data.push(result.data[i].check_date)
              optionLine.series[0].data.push(result.data[i].actual_value)
              optionLine.series[1].data.push(result.data[i].standard_value)
              optionLine.series[2].data.push(Number(result.data[i].upper_limit))
              optionLine.series[3].data.push(Number(result.data[i].lower_limit))
            }
            //设置图表标题
            if (this.languageS==='chinese'){
              optionLine.title.text=result.data[0].project.split('/')[0]
            }
            if (this.languageS==='english'){
              optionLine.title.text=result.data[0].project.split('/')[1]
            }
            if (this.languageS==='russian'){
              optionLine.title.text=result.data[0].project.split('/')[2]
            }
            //设置图表y轴最大值
            optionLine.yAxis.max=this.formatDecimal(1.1*Number(result.data[0].upper_limit),1)
            //设置图表y轴最小值
            optionLine.yAxis.min=this.formatDecimal(0.9*Number(result.data[0].lower_limit),1)
          }
          //如果折线图已有数据，先清空
          if (this.lineChartData) {
            this.lineChartData.dispose()
          }
          this.lineChartData=echarts.init(this.$refs.lineChart)
          this.lineChartData.setOption(optionLine)

          //直方图
          let optionBar={
            title:{
              //设置标题的样式
              textStyle:{
                color:'red',
              },
              //设置标题的居中方式（水平）
              x:'center',
              text:'暂未选择',
              top: '-3px', // 标题距离容器顶部的距离（百分比或像素值，如 '20px'）
            },
            xAxis:[
              {
                data:[]
              },
              {
                type: 'value',
                name: '辅助X轴',
                position: 'top',
                min: 0,
                max: 1,
                axisLabel: { show: false }, // 隐藏数值标签
                axisLine: { show: false },  // 隐藏轴线
                axisTick: { show: false }   // 隐藏刻度线
              }
            ],
            yAxis: [
              { // 主 Y 轴（左侧，默认）
                type: 'value',
                min: 0,
                max: 100,
                name: '频数', // 可选：添加主 Y 轴标签
              },
              { // 副 Y 轴（右侧，用于分布曲线）
                type: 'value',
                min: 0, // 根据数据动态调整
                max: 1, // 假设分布曲线是概率密度，范围在 0~1
                name: '概率密度', // 可选：添加副 Y 轴标签
                splitLine: { show: false }, // 可选：隐藏副 Y 轴的网格线
              }
            ],
            series:[
              {
                //设置系列，设置当前映射出的图形
                name:'valueUse',
                type:'bar',
                stack:'num',
                data:[],
                xAxisIndex: 0, // 关联主X轴
              },
              {
                name: '上下限',
                type: 'line',
                smooth: true, // 启用平滑曲线
                symbol: 'none', // 隐藏数据点标记
                lineStyle: {
                  width: 3,
                  color: '#FF6347' // 设置折线颜色
                },
                data: [], // 折线图数据
                xAxisIndex: 0, // 关联主X轴
                yAxisIndex: 1, // 关键：指定使用第二个 Y 轴（副 Y 轴）
              },
              {
                name: '',
                type: 'line',
                smooth: true, // 竖直的线
                symbol: 'none', // 隐藏数据点标记
                lineStyle: {
                  width: 3,
                  color: '#FF6347' // 设置折线颜色
                },
                //添加一条竖直的线
                markLine: {
                  silent: true, // 不触发事件
                  symbol: 'none',//隐藏箭头和圆点
                  lineStyle: {
                    color: 'red', // 线条颜色
                    width: 2,     // 线条宽度
                    type: 'solid' // 实线
                  },
                  label: {
                    show: true, // 显示标签
                    formatter: function(params) {
                      // 根据不同的线返回不同的标签（UCL 或 LCL）
                      return params.data.label || ''; // 默认显示空，或通过 data 中自定义
                    },
                    position: 'end', // 标签位置（可选：'start', 'middle', 'end'）
                    color: 'red', // 标签颜色（与线条一致）
                    fontSize: 12 // 字体大小
                  },
                  data: [
                    {
                      xAxis: this.formatDecimal(Number(result.data[0].upper_limit),3),
                      label: 'UCL', // 自定义标签
                      lineStyle: { color: 'red' } // 可单独设置颜色（可选）
                    },
                    // 第二条线：x = 0.117，标签为 "LCL"
                    {
                      xAxis: this.formatDecimal(Number(result.data[0].lower_limit),3),
                      label: 'LCL', // 自定义标签
                      lineStyle: { color: 'red' } // 可单独设置颜色（可选）
                    }
                  ]
                },
                data: [], // 折线图数据
                xAxisIndex: 1, // 关联主X轴
                yAxisIndex: 0, // 关键：指定使用第二个 Y 轴（副 Y 轴）
              },
            ],
            grid: {
              top:'20%',
              left: '2%', // 图表内容距离容器左侧的距离
              right: '2%', // 图表内容距离容器右侧的距离
              bottom: '10%', // 图表内容距离容器底部的距离，可以适当增加这个值来留出更多空间给标题
              containLabel: true, // 网格是否包含坐标轴的标签在内
            },
            tooltip:{
              //触发类型
              trigger:'axis',
              //设置坐标轴的指示器
              axisPointer:{
                type: 'cross'
              },
            },
            // 添加 toolbox 配置
            toolbox: {
              feature: {
                saveAsImage: {
                  title: '下载图表', // 按钮提示文字
                  type: 'png', // 默认保存为 png 格式
                  pixelRatio: 2 // 图片分辨率比例，默认为1
                }
              },
              right: 5, // 工具箱位置，距离右侧20px
              top: 0 // 工具箱位置，距离顶部20px
            }
          }
          let barValue= this.calculateHistogramData(testValues,
              Number(result.data[0].standard_value),
              Number(result.data[0].upper_limit),
              Number(result.data[0].lower_limit), 10)
          //设置图表标题
          if (this.languageS==='chinese'){
            optionBar.title.text="直方图"
          }
          else if (this.languageS==='english'){
            optionBar.title.text="Histogram"
          }
          else if (this.languageS==='russian'){
            optionBar.title.text="Гистограмма"
          }
          //设置图表x轴
          optionBar.xAxis[0].data=barValue.binEdges
          optionBar.xAxis[1].max=Number(barValue.binEdges[barValue.binEdges.length-1])
          optionBar.xAxis[1].min=Number(barValue.binEdges[0])
          //设置图表数据(柱状图）
          optionBar.series[0].data=barValue.frequencies
          //设置图标数据（正泰分布图）
          optionBar.series[1].data=barValue.normalDistribution
          //设置图表y值
          optionBar.yAxis[0].max=Math.max(...barValue.frequencies)+1
          optionBar.yAxis[0].min=0
          optionBar.yAxis[1].max=Math.max(...barValue.normalDistribution)
          optionBar.yAxis[1].min=0
          //赋值,画图
          if (this.barChartData) {
            this.barChartData.dispose()
          }
          this.barChartData=echarts.init(this.$refs.barChart)
          this.barChartData.setOption(optionBar)

          //画移动极差图
          let movingRangeValue = this.calculateMovingRangeData(testValues)
          let optionMovingRange={
            title:{
              //设置标题的样式
              textStyle:{
                color:'red',
              },
              //设置标题的居中方式（水平）
              x:'center',
              text:"",
            },
            xAxis:{
              data:[]
            },
            yAxis:{
              type: 'value',
              min:0, // 设置y轴的最小值
              max:100,//设置y轴的最大值
            },
            series:[
              {
                //设置系列，设置当前映射出的图形
                name:'valueUse',
                type:'line',
                stack:'num',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'standard',
                type:'line',
                stack:'standard',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'ceiling',
                type:'line',
                stack:'ceiling',
                data:[]
              },
              {
                //设置系列，设置当前映射出的图形
                name:'lower',
                type:'line',
                stack:'lower',
                data:[]
              },],
            grid: {
              top:'20%',
              left: '2%', // 图表内容距离容器左侧的距离
              right: '2%', // 图表内容距离容器右侧的距离
              bottom: '10%', // 图表内容距离容器底部的距离，可以适当增加这个值来留出更多空间给标题
              containLabel: true, // 网格是否包含坐标轴的标签在内
            },
            tooltip:{
              //触发类型
              trigger:'axis',
              //设置坐标轴的指示器
              axisPointer:{
                type: 'cross'
              },
            },
            // 添加 toolbox 配置
            toolbox: {
              feature: {
                saveAsImage: {
                  title: '下载图表', // 按钮提示文字
                  type: 'png', // 默认保存为 png 格式
                  pixelRatio: 2 // 图片分辨率比例，默认为1
                }
              },
              right: 5, // 工具箱位置，距离右侧20px
              top: 0 // 工具箱位置，距离顶部20px
            }
          }
          //设置图表标题
          if (this.languageS==='chinese'){
            optionMovingRange.title.text="移动极差图"
          }
          else if (this.languageS==='english'){
            optionMovingRange.title.text="Moving Range Chart"
          }
          else if (this.languageS==='russian'){
            optionMovingRange.title.text="Диаграмма скользящих размахов"
          }
          for (let i = 0; i < movingRangeValue.movingRanges.length; i++) {
            optionMovingRange.xAxis.data=i+1
            //赋值测量值
            optionMovingRange.series[0].data.push(this.formatDecimal(movingRangeValue.movingRanges[i],3))
            //赋值标准值
            optionMovingRange.series[1].data.push(movingRangeValue.mrBar)
            //赋值上公差
            optionMovingRange.series[2].data.push(movingRangeValue.uclMR)
            //赋值下公差
            optionMovingRange.series[3].data.push(movingRangeValue.lclMR)
          }
          optionMovingRange.yAxis.max=this.formatDecimal(Number(movingRangeValue.uclMR)*1.1,3)
          optionMovingRange.yAxis.min=0
          //如果移动极差图已有数据，先清空
          if (this.movingRangeChartData) {
            this.movingRangeChartData.dispose()
          }
          this.movingRangeChartData=echarts.init(this.$refs.movingRangeChart)
          this.movingRangeChartData.setOption(optionMovingRange)

          //计算ppk、cpk
          let ppkData=result.data
          this.ppkResult = this.calculatePpkCpk(ppkData)


          //
          this.trendResult = this.findContinuousTrendData(result.data)
        }
      })
    },

    //点击某一个项目画图的函数
    handleClickChart(row){
      this.oilProjectRow=row
      if (this.clickQuantity!=='' && this.clickQuantity!==null && this.clickQuantity!==undefined){
        this.changeDataQuantity(this.clickQuantity, row.id)
      }
    },

    //点击多少组数据的函数
    clickQuantityButton(quantity){
      this.clickQuantity=quantity
      if (this.clickQuantity===25){
        //按钮颜色变更
        this.chartBackground25='#0269fa'
        this.chartColor25='white'
        this.chartBackground50=''
        this.chartColor50=''
        this.chartBackground125=''
        this.chartColor125=''
        this.chartBackground300=''
        this.chartColor300=''
        this.chartBackground500=''
        this.chartColor500=''
      }
      else if (this.clickQuantity==50){
        //按钮颜色变更
        this.chartBackground25=''
        this.chartColor25=''
        this.chartBackground50='#0269fa'
        this.chartColor50='white'
        this.chartBackground125=''
        this.chartColor125=''
        this.chartBackground300=''
        this.chartColor300=''
        this.chartBackground500=''
        this.chartColor500=''
      }
      else if (this.clickQuantity==125){
        //按钮颜色变更
        this.chartBackground25=''
        this.chartColor25=''
        this.chartBackground50=''
        this.chartColor50=''
        this.chartBackground125='#0269fa'
        this.chartColor125='white'
        this.chartBackground300=''
        this.chartColor300=''
        this.chartBackground500=''
        this.chartColor500=''
      }
      else if (this.clickQuantity==300){
        //按钮颜色变更
        this.chartBackground25=''
        this.chartColor25=''
        this.chartBackground50=''
        this.chartColor50=''
        this.chartBackground125=''
        this.chartColor125=''
        this.chartBackground300='#0269fa'
        this.chartColor300='white'
        this.chartBackground500=''
        this.chartColor500=''
      }
      else if (this.clickQuantity==500){
        //按钮颜色变更
        this.chartBackground25=''
        this.chartColor25=''
        this.chartBackground50=''
        this.chartColor50=''
        this.chartBackground125=''
        this.chartColor125=''
        this.chartBackground300=''
        this.chartColor300=''
        this.chartBackground500='#0269fa'
        this.chartColor500='white'
      }
      if (this.oilProjectRow!=='' && this.oilProjectRow!==null && this.oilProjectRow!==undefined){
        this.changeDataQuantity(quantity,this.oilProjectRow.id)
      }
    },

    //用户点击趋势管理中检测项目中的行，改变背景颜色
    oilProjectRowClassName(row){
      // 如果当前行是currentRow，则返回特定的样式
      if (this.oilProjectRow && this.oilProjectRow === row.row) {
        return {
          backgroundColor: '#0269fa', // 蓝色背景
          color: 'grey', // 白色文字
          cursor: 'pointer' // 鼠标悬停时变成小手
        };
      }
      return {}; // 否则不应用任何样式
    },

    //辅助函数：画直方图用的
    calculateHistogramData(testValues, standardValue, upperLimit, lowerLimit, numBins = 10) {
      if (!testValues || testValues.length === 0) {
        throw new Error('测试值数组不能为空');
      }

      // 计算数据的最大值和最小值
      let max = Math.max(...testValues);
      if (max < upperLimit) {
        max = upperLimit;
      }
      let min = Math.min(...testValues);
      if (min > lowerLimit) {
        min = lowerLimit;
      }

      // 计算极差
      const range = max - min;
      // 计算组距
      const binWidth = range / numBins;
      // 初始化频数数组
      const frequencies = new Array(numBins).fill(0);
      // 计算每个柱子的边界
      const binEdges = [];
      for (let i = 0; i <= numBins; i++) {
        binEdges.push(this.formatDecimal(min + i * binWidth, 3));
      }

      // 统计频数
      testValues.forEach(value => {
        const index = Math.floor((value - min) / binWidth);
        const finalIndex = index >= numBins ? numBins - 1 : index;
        frequencies[finalIndex]++;
      });

      // 计算正态分布曲线数据
      const normalDistributionData = [];
      const binCenters = [];

      for (let i = 0; i < numBins; i++) {
        const center = (Number(binEdges[i]) + Number(binEdges[i + 1])) / 2;
        binCenters.push(Number(center));
      }

      // 计算均值和标准差
      const mean = testValues.reduce((sum, val) => sum + val, 0) / testValues.length;
      const variance = testValues.reduce((sum, val) => sum + Math.pow(val - mean, 2), 0) / testValues.length;
      const stdDev = Math.sqrt(variance);

      // 正态分布函数
      const normalDist = (x) => {
        return (1 / (stdDev * Math.sqrt(2 * Math.PI))) *
            Math.exp(-Math.pow(x - mean, 2) / (2 * Math.pow(stdDev, 2)));
      };

      // 修正归一化因子计算
      const maxDensity = Math.max(...binCenters.map(x => normalDist(x)));
      const maxFrequency = Math.max(...frequencies);

      // 关键修正：正确的归一化方法
      // 正态分布曲线应该与频数在同一量级，但作为概率密度显示
      // 我们可以让曲线的高度与频数成比例，但保持其概率密度特性
      const scaleFactor = maxFrequency / (maxDensity * binWidth * testValues.length);

      // 生成正态分布曲线数据
      for (let i = 0; i < numBins; i++) {
        const center = binCenters[i];
        // 修正：使用正确的归一化公式
        const density = normalDist(center) * scaleFactor * binWidth * testValues.length;
        normalDistributionData.push(this.formatDecimal(density, 3));
      }

      const histogramData = {
        binEdges: binEdges,
        binCenters: binCenters,
        frequencies: frequencies,
        normalDistribution: normalDistributionData,
        standardValue: standardValue,
        upperLimit: upperLimit,
        lowerLimit: lowerLimit,
        testValues: testValues,
        mean: this.formatDecimal(mean, 3),
        stdDev: this.formatDecimal(stdDev, 3)
      };
      return histogramData;
    },
    //辅助函数：画移动极差图用的
    calculateMovingRangeData(data) {
      if (!Array.isArray(data) || data.length < 2) {
        throw new Error('输入必须是一个包含至少2个数字的数组');
      }
      // 1. 计算移动极差（MR）
      const movingRanges = [];
      for (let i = 1; i < data.length; i++) {
        movingRanges.push(Math.abs(data[i] - data[i - 1]));
      }
      // 2. 计算平均移动极差（MR-bar）
      const mrBar = movingRanges.reduce((sum, mr) => sum + mr, 0) / movingRanges.length;
      // 3. 计算控制限
      // D4和D3是移动极差图的常数，对于子组大小n=2时：
      const D4 = 3.267;
      const D3 = 0; // 对于n=2，D3=0

      const uclMR = D4 * mrBar; // 移动极差上限
      const lclMR = D3 * mrBar; // 移动极差下限（通常为0）

      // 4. 计算个体图的控制限（用于X图）
      // A2是个体图的常数，对于n=2时：
      const A2 = 1.880;

      const xBar = data.reduce((sum, x) => sum + x, 0) / data.length;
      const uclX = xBar + A2 * mrBar;
      const lclX = xBar - A2 * mrBar;

      return {
        // 原始数据
        originalData: [...data],

        // 移动极差数据
        movingRanges: movingRanges,
        mrBar: mrBar,
        uclMR: uclMR,
        lclMR: lclMR,

        // 个体图数据
        xBar: xBar,
        uclX: uclX,
        lclX: lclX,

        // 其他统计量
        sampleSize: 2, // 移动极差的子组大小固定为2
        dataPoints: data.length,

        // 辅助方法
        isWithinControlLimits: function(value, type = 'X') {
          if (type === 'X') {
            return value >= this.lclX && value <= this.uclX;
          } else if (type === 'MR') {
            return value >= this.lclMR && value <= this.uclMR;
          }
          return false;
        }
      };
    },

    //计算ppk、cpk
    /**
     * 计算 Ppk 和 Cpk
     * @param {Array} oilHistoricalData 数据数组
     * @returns {Object} { ppk, cpk } 或错误信息
     */
    calculatePpkCpk(oilHistoricalData) {
      // 1. 提取有效的 measuring_value 并转换为数值数组
      const actualValues = oilHistoricalData
          .map(item => parseFloat(item.actual_value))
          .filter(value => !isNaN(value));

      if (actualValues.length < 2) {
        return { error: "有效测量值不足（至少需要2个数据点）" };
      }

      // 2. 获取规格上下限
      const sampleItem = oilHistoricalData.find(item =>
          item.upper_limit && item.lower_limit &&
          item.standard_value !== undefined
      );

      if (!sampleItem) {
        return { error: "缺少规格上限(USL)或下限(LSL)" };
      }

      const USL = parseFloat(Number(sampleItem.upper_limit));

      const LSL = parseFloat(Number(sampleItem.lower_limit));

      // 3. 验证规格有效性
      if (USL <= LSL) {
        return { error: "规格上限必须大于下限" };
      }

      // 4. 计算统计量
      const n = actualValues.length;
      const mean = actualValues.reduce((sum, val) => sum + val, 0) / n;

      // 计算样本标准差（用于Cpk）
      const sampleVariance = actualValues
          .map(val => Math.pow(val - mean, 2))
          .reduce((sum, val) => sum + val, 0) / (n - 1);

      const sampleSigma = Math.sqrt(sampleVariance);

      // 计算总体标准差（用于Ppk）
      const populationVariance = actualValues
          .map(val => Math.pow(val - mean, 2))
          .reduce((sum, val) => sum + val, 0) / n;

      const populationSigma = Math.sqrt(populationVariance);

      // 5. 计算 Cpk 和 Ppk
      const calculateIndex = (targetMean, usl, lsl, sigma) => {
        const cpu = (usl - targetMean) / (3 * sigma);
        const cpl = (targetMean - lsl) / (3 * sigma);
        return Math.min(cpu, cpl);
      };

      // 6. 边界条件检查
      if (sampleSigma === 0 || populationSigma === 0) {
        return { error: "标准差为零，无法计算能力指数" };
      }

      const cpk = calculateIndex(mean, USL, LSL, sampleSigma);
      const ppk = calculateIndex(mean, USL, LSL, populationSigma);

      return {
        ppk: parseFloat(ppk.toFixed(4)),
        cpk: parseFloat(cpk.toFixed(4)),
        mean: parseFloat(mean.toFixed(4)),
        sampleSigma: parseFloat(sampleSigma.toFixed(4)),
        populationSigma: parseFloat(populationSigma.toFixed(4)),
        usl: USL,
        lsl: LSL,
        count: n
      };
    },

    /**
     * 检测连续6点及以上上升或下降的数据行
     * @param {Array} tableData - 数据数组
     * @returns {Array} 返回所有符合条件的连续数据组（每组包含趋势类型和对应的整行数据）
     */
    findContinuousTrendData(oilListData) {
      const result = {
        hasContinuousIncreasing: false,
        hasContinuousDecreasing: false,
        continuousIncreasingData: [],
        continuousDecreasingData: []
      };

      const validData = oilListData.filter(item => item.actual_value !== null && item.actual_value !== undefined);

      if (validData.length < 6) return result;

      let currentTrend = null;
      let startIndex = 0;

      for (let i = 1; i < validData.length; i++) {
        const prev = validData[i - 1].actual_value;
        const curr = validData[i].actual_value;

        if (curr > prev) {
          if (currentTrend === 'decreasing') {
            if (i - 1 - startIndex >= 5) {
              result.hasContinuousDecreasing = true;
              result.continuousDecreasingData.push(validData.slice(startIndex, i));
            }
            startIndex = i - 1;
          }
          currentTrend = 'increasing';
        } else if (curr < prev) {
          if (currentTrend === 'increasing') {
            if (i - 1 - startIndex >= 5) {
              result.hasContinuousIncreasing = true;
              result.continuousIncreasingData.push(validData.slice(startIndex, i));
            }
            startIndex = i - 1;
          }
          currentTrend = 'decreasing';
        } else {
          if (currentTrend) {
            if (i - 1 - startIndex >= 5) {
              if (currentTrend === 'increasing') {
                result.hasContinuousIncreasing = true;
                result.continuousIncreasingData.push(validData.slice(startIndex, i));
              } else {
                result.hasContinuousDecreasing = true;
                result.continuousDecreasingData.push(validData.slice(startIndex, i));
              }
            }
          }
          currentTrend = null;
          startIndex = i;
        }

        if (i === validData.length - 1 && currentTrend) {
          if (i - startIndex >= 5) {
            if (currentTrend === 'increasing') {
              result.hasContinuousIncreasing = true;
              result.continuousIncreasingData.push(validData.slice(startIndex, i + 1));
            } else {
              result.hasContinuousDecreasing = true;
              result.continuousDecreasingData.push(validData.slice(startIndex, i + 1));
            }
          }
        }
      }
      return result;
    },

    //显示连续六点上升/下降数据的弹窗
    showTrendDialog(type) {
      if (this.languageS==='chinese'){
        this.titleUse="连续6点(及以上)上升/下降数据"
      }
      else if (this.languageS==='english'){
        this.titleUse="Continuous increase/decrease data for 6 (or more points)"
      }
      else if (this.languageS==='russian'){
        this.titleUse="Непрерывное увеличение/уменьшение данных на 6 (или более пунктов)"
      }
      this.continuousData=[]
      if (type==="increasing"){
        for (let i = 0; i < this.trendResult.continuousIncreasingData.length; i++) {
          this.continuousData=this.continuousData.concat(this.trendResult.continuousIncreasingData[i])
        }
      }
      else if(type==="decreasing"){
        for (let i = 0; i < this.trendResult.continuousDecreasingData.length; i++) {
          this.continuousData=this.continuousData.concat(this.trendResult.continuousDecreasingData[i])
        }
      }
      this.continuousDataDialog = true;
    },

    //———————————————————————————————————————————微小缺陷记录——————————————————————————————————————————
    // 筛选原始数据表格
    handleFilterMinorDefectRecord() {
      // 如果没有原始数据，直接返回
      if (!this.minorDefectRecordData || this.minorDefectRecordData.length === 0) {
        this.filteredMinorDefectRecordData = [];
        return;
      }
      // 筛选逻辑
      this.filteredMinorDefectRecordData = this.minorDefectRecordData.filter(item => {
        const matchesDate = !this.date ||
            (item.date &&
                item.date.includes(this.date));

        const matchesLine = !this.line ||
            (item.line &&
                item.line === this.line);

        const matchesOp = !this.op ||
            (item.op &&
                item.op === this.op);

        const matchesResponsiblePerson = !this.responsible_person ||
            (item.responsible_person &&
                item.responsible_person.includes(this.responsible_person));

        return matchesDate && matchesLine && matchesOp && matchesResponsiblePerson;
      });
      // 更新分页总数（基于筛选后的数据）
      this.minorDefectRecordPagination.total = this.filteredMinorDefectRecordData.length;
      // 重置到第一页
      this.minorDefectRecordPagination.currentPage = 1;
      // 强制刷新表格（如果使用 :key 绑定）
      this.componentKey++;
    },
    // 重置筛选条件
    resetFilterMinorDefectRecord() {
      this.date = '';
      this.line = '';
      this.op = '';
      this.responsible_person = '';
      this.filteredMinorDefectRecordData = [...this.minorDefectRecordData]; // 恢复原始数据
      // 更新分页总数
      const workshop = '机加/Machining Workshop/Обработки линия'
      this.queryMinorDefectRecordQuantity(workshop).then(data => {
        this.minorDefectRecordPagination.total = data; // 更新为所有数据的总数
      });
      // 重置到第一页
      this.minorDefectRecordPagination.currentPage = 1;
      this.componentKey++; // 强制刷新表格
    },

    //显示编辑微小缺陷记录的弹窗，doe 1：新增；2：编辑
    minorDefectRecordEditShow(doe,scope){
      this.defect_description_chinese=''
      this.defect_description_english=''
      this.defect_description_russian=''
      this.minorDefectRecordDoe=doe
      this.minorDefectRecordScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条微小缺陷记录'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of Minor Defect Record'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку Запис незначительных дефектов'
        }
        //对表单变量赋值，给一个空的
        this.minorDefectRecordForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:0,

          //班组
          team:'',
          //提出人
          raised_by:'',
          //日期
          date:'',
          //车间名称
          workshop:'',
          //线体名称
          line:'',
          //工序号
          op:'',
          //设备编号
          equipment_number:'',
          //缺陷描述
          defect_description:'',
          //对策内容
          countermeasure_content:'',
          //备件信息
          spare_parts_information:'',
          //责任人
          responsible_person:'',
          //完成日期
          completion_date:'',
          //对策有效性
          countermeasure_effectiveness:'',
          //确认人
          confirmed_by:'',
          //结题
          closing:'',
          //是否汇报
          reporting:'',
        }
        //控制弹窗打开
        this.minorDefectRecordDialog=true
      }
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条微小缺陷记录'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of Minor Defect Record'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку Запис незначительных дефектов'
        }
        //将组合的缺陷描述拆分
        this.defect_description_chinese=this.minorDefectRecordScope.row.defect_description.split('|*|')[0]
        this.defect_description_english=this.minorDefectRecordScope.row.defect_description.split('|*|')[1]
        this.defect_description_russian=this.minorDefectRecordScope.row.defect_description.split('|*|')[2]
        //给表单赋值
        this.minorDefectRecordForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.minorDefectRecordDialog=true
      }
    },
    //显示编辑微小缺陷对策内容的弹窗
    editCountermeasureContent(doe,scope){
      this.minorDefectRecordDoe=doe
      this.minorDefectRecordScope=scope
      if (doe===3){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改该条微小缺陷的对策内容'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing the countermeasure content for this minor defect'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете содержание контрмеры для этого незначительного дефекта'
        }
        //给表单赋值
        this.minorDefectRecordForm=_.cloneDeep(scope.row)
        // 初始化原因分析的富文本编辑器
        let chineseCountermeasure = '';
        let englishCountermeasure = '';
        let russianCountermeasure = '';
        // 解析现有的原因分析数据
        if (this.minorDefectRecordForm.countermeasure_content!=='' && this.minorDefectRecordForm.countermeasure_content !== null && this.minorDefectRecordForm.countermeasure_content !== undefined) {
          const tempCountermeasure = this.minorDefectRecordForm.countermeasure_content.split('|*|');
          chineseCountermeasure = tempCountermeasure[0] || '';
          englishCountermeasure = tempCountermeasure[1] || '';
          russianCountermeasure = tempCountermeasure[2] || '';
        }
        //控制弹窗打开
        this.countermeasureContentDialog=true
        // 使用 $nextTick 确保 DOM 已经渲染
        this.$nextTick(() => {
          this.initEditor('countermeasure_content_chinese', 'countermeasure_content_chinese', chineseCountermeasure);
          this.initEditor('countermeasure_content_english', 'countermeasure_content_english', englishCountermeasure);
          this.initEditor('countermeasure_content_russian', 'countermeasure_content_russian', russianCountermeasure);
        });
      }
    },
    //显示编辑微小缺陷对策有效性的弹窗
    editCountermeasureEffectiveness(doe,scope){
      this.minorDefectRecordDoe=doe
      this.minorDefectRecordScope=scope
      if (doe===4){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改该条微小缺陷的对策有效性'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing the effectiveness of the countermeasures for this minor defect'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете эффективность контрмер для этого незначительного дефекта'
        }
        //给表单赋值
        this.minorDefectRecordForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.countermeasureEffectivenessDialog=true
      }
    },
    //点击编辑微小缺陷记录弹窗中的确定
    minorDefectRecordOk(){
      //在发送请求前，组合缺陷描述、对策内容
      this.minorDefectRecordForm.defect_description =
          this.defect_description_chinese + '|*|' +
          this.defect_description_english + '|*|' +
          this.defect_description_russian;
      //当插入一行时
      if (this.minorDefectRecordDoe===1){
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertMinorDefectRecordGoodProduct',this.minorDefectRecordForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            // 手动更新分页信息
            this.minorDefectRecordPagination.total += 1
            //修改大表数据
            this.minorDefectRecordData.push(this.minorDefectRecordForm)
            this.filteredMinorDefectRecordData=[...this.minorDefectRecordData]
            //关闭窗口
            this.minorDefectRecordDialog=false
          }
        })
      }
      //当编辑某一行时
      if (this.minorDefectRecordDoe===2){
        this.$request.post('/editMinorDefectRecordGoodProduct',this.minorDefectRecordForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.minorDefectRecordData.splice(this.minorDefectRecordScope.$index,1,this.minorDefectRecordForm)
            // 更新 filteredMinorDefectRecordData 中对应的行
            const indexInFiltered = this.filteredMinorDefectRecordData.findIndex(item =>
                item.id === this.minorDefectRecordForm.id // 使用唯一标识符匹配
            );
            if (indexInFiltered !== -1) {
              this.filteredMinorDefectRecordData.splice(indexInFiltered, 1, this.minorDefectRecordForm);
            }

            //关闭窗口
            this.minorDefectRecordDialog=false

          }
        })
      }
    },
    //点击编辑微小缺陷对策弹窗中的确定
    minorDefectCountermeasureOk(){
      //当编辑某一行对策内容时
      if (this.minorDefectRecordDoe===3){
        //在发送请求前，组合缺陷描述、对策内容
        this.minorDefectRecordForm.countermeasure_content =
            this.countermeasure_content_chinese.txt.html() + '|*|' +
            this.countermeasure_content_english.txt.html() + '|*|' +
            this.countermeasure_content_russian.txt.html();
        this.$request.post('/editMinorDefectRecordGoodProduct',this.minorDefectRecordForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.minorDefectRecordData.splice(this.minorDefectRecordScope.$index,1,this.minorDefectRecordForm)
            // 更新 filteredMinorDefectRecordData 中对应的行
            const indexInFiltered = this.filteredMinorDefectRecordData.findIndex(item =>
                item.id === this.minorDefectRecordForm.id // 使用唯一标识符匹配
            );
            if (indexInFiltered !== -1) {
              this.filteredMinorDefectRecordData.splice(indexInFiltered, 1, this.minorDefectRecordForm);
            }

            //关闭窗口
            this.countermeasureContentDialog=false
          }
        })
      }
      else if (this.minorDefectRecordDoe===4){
        this.$request.post('/editMinorDefectRecordGoodProduct',this.minorDefectRecordForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.minorDefectRecordData.splice(this.minorDefectRecordScope.$index,1,this.minorDefectRecordForm)
            // 更新 filteredMinorDefectRecordData 中对应的行
            const indexInFiltered = this.filteredMinorDefectRecordData.findIndex(item =>
                item.id === this.minorDefectRecordForm.id // 使用唯一标识符匹配
            );
            if (indexInFiltered !== -1) {
              this.filteredMinorDefectRecordData.splice(indexInFiltered, 1, this.minorDefectRecordForm);
            }

            //关闭窗口
            this.countermeasureEffectivenessDialog=false
          }
        })
      }
    },

    //辅助函数：查询微小缺陷记录的当前页数据
    async queryMinorDefectRecordWithPagination(workshop) {
      const { currentPage, pageSize } = this.minorDefectRecordPagination;
      const response = await this.$request.post('/queryMinorDefectsRecordPaginationGoodProduct', {
        page: currentPage-1,
        size: pageSize,
        workshop: workshop
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.minorDefectRecordPagination.currentPage-1)*this.minorDefectRecordPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询微小缺陷记录条目总数
    async queryMinorDefectRecordQuantity(workshop){
      const response = await this.$request.post('/queryMinorDefectsRecordQuantityGoodProduct', {
        workshop:workshop});
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    //处理每页显示条数的变化
    handleSizeChangeMinorDefectRecord(val) {
      this.minorDefectRecordPagination.pageSize = val;
      const workshop = this.selectTree === 2
          ? '装配/Assembly Workshop/Сборочная линия'
          : '机加/Machining Workshop/Обработки линия';
      this.queryMinorDefectRecordWithPagination(workshop).then(data=>{
        this.minorDefectRecordData=data
        this.filteredMinorDefectRecordData=[...this.minorDefectRecordData]
      });
    },
    //处理选择哪页的变化
    handleCurrentChangeMinorDefectRecord(val) {
      this.minorDefectRecordPagination.currentPage = val;
      const workshop = this.selectTree === 2
          ? '装配/Assembly Workshop/Сборочная линия'
          : '机加/Machining Workshop/Обработки линия';
      this.queryMinorDefectRecordWithPagination(workshop).then(data=>{
        this.minorDefectRecordData=data
        this.filteredMinorDefectRecordData=[...this.minorDefectRecordData]
      });
    },

    //初始化单个富文本
    initEditor(editorKey, refName, htmlVal) {
      // 销毁已有实例
      if (this[editorKey]) {
        this[editorKey].destroy();
        this[editorKey] = null;
      }

      const container = this.$refs[refName];
      if (!container) return;

      // 创建新实例
      this[editorKey] = new E(container);

      // 配置菜单
      this[editorKey].config.menus = [
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
        'foreColor',
        'backColor',
        'list',
        'justify',
        'table'
      ];
      //创建编辑器
      this[editorKey].create();
      this[editorKey].txt.html(htmlVal)
    },
    // 获取所有编辑器内容
    getEditorContents() {
      return {
        reason: {
          chinese: this.countermeasure_content_chinese?.txt.html() || '',
          english: this.countermeasure_content_english?.txt.html() || '',
          russian: this.countermeasure_content_russian?.txt.html() || ''
        },
      };
    },
    // 销毁所有编辑器
    destroyAllEditors() {
      const editors = [
        'countermeasure_content_chinese',
        'countermeasure_content_english',
        'countermeasure_content_russian',
      ];

      editors.forEach(editorKey => {
        if (this[editorKey]) {
          this[editorKey].destroy();
          this[editorKey] = null;
        }
      });
    },

    //———————————————————————————————————————————特急分解检测标准——————————————————————————————————————————
    //赋值零部件编号及名称中英俄
    handlePartNumberChange(selectedValue) {
      if (selectedValue) {
        const parts = selectedValue.split('/');
        // 将切割后的值分别赋给对应的字段
        this.urgentTeardownStandardForm.part_number = parts[0] || ''; // 第0个放到part_number中
        this.text1 = parts[1] || ''; // 第1个放到text1中
        this.text2 = parts[2] || ''; // 第2个放到text2中
        this.text3 = parts[3] || ''; // 第3个放到text3中
      } else {
        // 如果清空了选择，重置所有字段
        this.urgentTeardownStandardForm.part_number = '';
        this.text1 = '';
        this.text2 = '';
        this.text3 = '';
      }
    },
    //显示编辑特急分解检测标准的弹窗，doe 1：新增；2：编辑
    urgentTeardownStandardEditShow(doe,scope){
      this.urgentTeardownStandardDoe=doe
      this.urgentTeardownStandardScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在插入一条特急分解检测标准'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are inserting one line of Urgent Teardown Measurement Standard'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы вставляете одну строку экстренного стандарта измерения разрыва'
        }
        //对表单变量赋值，给一个空的
        this.text1=''
        this.text2=''
        this.text3=''
        this.text4=''
        this.text5=''
        this.text6=''
        this.urgentTeardownStandardForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:this.useId+'/'+this.useName,
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:0,

          //零部件图号
          part_number:'',
          //零部件名称
          part_name:'',
          //检测项目
          measurement_project:'',
          //类别
          category:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //标准建立人
          standard_setter:'',
          //批准人
          approver:'',
          //检测地点
          measurement_place:'',
        }
        //控制弹窗打开
        this.urgentTeardownStandardDialog=true
      }
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条特急分解检测标准'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of Urgent Teardown Measurement Standard'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку экстренного стандарта измерения разрыва'
        }
        //将组合的缺陷描述拆分
        this.text1=this.urgentTeardownStandardScope.row.part_name.split('|*|')[0]
        this.text2=this.urgentTeardownStandardScope.row.part_name.split('|*|')[1]
        this.text3=this.urgentTeardownStandardScope.row.part_name.split('|*|')[2]
        this.text4=this.urgentTeardownStandardScope.row.measurement_project.split('|*|')[0]
        this.text5=this.urgentTeardownStandardScope.row.measurement_project.split('|*|')[1]
        this.text6=this.urgentTeardownStandardScope.row.measurement_project.split('|*|')[2]
        //给表单赋值
        this.urgentTeardownStandardForm=_.cloneDeep(scope.row)
        //控制弹窗打开
        this.urgentTeardownStandardDialog=true
      }
    },
    //显示编辑特急分解检测标准的弹窗
    urgentTeardownStandardOk(){
      if(this.text4==='' || this.text4===null || this.text4===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"检测项目_中"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Measurement project_Chinese"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект измерения_Китайский"')
        }
        return
      }
      if(this.text5==='' || this.text5===null || this.text5===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"检测项目_英"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Measurement project_English"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект измерения_Английский"')
        }
        return
      }
      if(this.text6==='' || this.text6===null || this.text6===undefined){
        if (this.languageS==='chinese'){
          this.$message.error('您未输入"检测项目_俄"，请输入')
        }
        else if (this.languageS==='english'){
          this.$message.error('Please enter the "Measurement project_Russian"')
        }
        else if (this.languageS==='russian'){
          this.$message.error('Пожалуйста, введите "Проект измерения_Pусский"')
        }
        return
      }
      //在发送请求前，组合零部件名称、检测项目
      this.urgentTeardownStandardForm.part_name =
          this.text1 + '|*|' + this.text2 + '|*|' + this.text3;
      this.urgentTeardownStandardForm.measurement_project =
          this.text4 + '|*|' + this.text5 + '|*|' + this.text6;
      //当插入一行时
      if (this.urgentTeardownStandardDoe===1){
        //向后端发送请求插入数据（①第一个参数是发送到哪个网址；②发送哪个数据）；result是指接收哪些数据
        this.$request.post('/insertUrgentTeardownStandardGoodProduct',this.urgentTeardownStandardForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示插入成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('插入成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Insert successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно вставить')
            }
            //修改大表数据
            this.urgentTeardownStandardData.push(this.urgentTeardownStandardForm)
            //关闭窗口
            this.urgentTeardownStandardDialog=false
          }
        })
      }
      //当编辑某一行时
      else if (this.urgentTeardownStandardDoe===2){
        this.$request.post('/editUrgentTeardownStandardGoodProduct',this.urgentTeardownStandardForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('编辑成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Edit successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Редактировать успешно')
            }
            //修改大表数据
            this.urgentTeardownStandardData.splice(this.urgentTeardownStandardScope.$index,1,this.urgentTeardownStandardForm)

            //关闭窗口
            this.urgentTeardownStandardDialog=false

          }
        })
      }
    },

    //辅助函数：查询特急分解检测标准的所有信息
    async queryUrgentTeardownStandardAll(){
      return this.$request.post('/queryUrgentTeardownStandardAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //将数据输出到页面表格中
          this.urgentTeardownStandardData=result.data
        }
      })
    },

    //辅助函数：查询油液历史点检数据的当前页数据
    async queryUrgentTeardownStandardWithPagination() {
      const { currentPage, pageSize } = this.urgentTeardownStandardPagination;
      const response = await this.$request.post('/queryUrgentTeardownStandardPaginationGoodProduct', {
        page: currentPage-1,
        size: pageSize,
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.urgentTeardownStandardPagination.currentPage-1)*this.urgentTeardownStandardPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询油液历史点检数据条目总数
    async queryUrgentTeardownStandardQuantity(){
      const response = await this.$request.post('/queryUrgentTeardownStandardQuantityGoodProduct');
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    // 处理每页显示条数的变化
    handleSizeChangeUrgentTeardownStandard(val) {
      this.urgentTeardownStandardPagination.pageSize = val;
      this.urgentTeardownStandardPagination.currentPage = 1;
      this.queryUrgentTeardownStandardWithPagination().then(data => {
        this.urgentTeardownStandardData = data;
      });
    },
    // 处理选择哪页的变化
    handleCurrentChangeUrgentTeardownStandard(val) {
      this.urgentTeardownStandardPagination.currentPage = val;
      this.queryUrgentTeardownStandardWithPagination().then(data => {
        this.urgentTeardownStandardData = data;
      });
    },

    //———————————————————————————————————————————特急分解检测结果——————————————————————————————————————————
    //我要送检弹窗显示
    sendToMeasureShow(doe,scope){
      this.selectEngineModel=''
      this.filteredUrgentTeardownStandardData=[...this.urgentTeardownStandardData]
      this.urgentTeardownResultDoe=doe
      this.urgentTeardownResultScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在选择特急分解送检项目'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are choosing urgent teardown measurement project'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы выбираете проект экстренного измерения разрыва'
        }
        this.urgentTeardownResultForm={
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //机型
          engine_model:'',
          //零部件图号
          part_number:'',
          //零部件名称
          part_name:'',
          //检测项目
          measurement_project:'',
          //类别
          category:'',
          //标准值
          standard_value:'',
          //上公差
          upper_tolerance:'',
          //下公差
          lower_tolerance:'',
          //标准建立人
          standard_setter:'',
          //批准人
          approver:'',
          //检测地点
          measurement_place:'',
          //特急分解编号
          urgent_teardown_number:'',
          //送检人
          send_measurement_person:'',
          //发动机号
          engine_number:'',
          //实测值
          actual_value:'',
          //检测_拍照人
          measuring_picture_person:'',
          //检测日期
          measurement_date:'',
          //图片文件名称
          file_name:'',
          //特急分解名称
          urgent_teardown_name:'',
          //备注
          notes:'',
        },
        this.sendToMeasureDialog=true
      }
    },
    //我要送检信息提交
    async sendToMeasureOk() {
      // 校验必须选择机型（radio）
      if (!this.selectEngineModel) {
        alert('请先选择机型');
        return;
      }

      // 准备要插入的数据
      const insertData = [];

      // 遍历筛选出的标准数据，为每条标准创建对应的检测结果记录
      for (const standard of this.filteredUrgentTeardownStandardData) {
        const resultRecord = {
          // 系统字段
          id: this.generateUUIDv4(),
          create_time: '',
          update_time: '',
          creator: this.useId + '/' + this.useName,
          process_status: '',
          sys_update_user: '',
          sys_audit_user: '',
          sys_audit_time: '',
          sys_deleted: 0,

          // 从标准数据复制的字段
          engine_model: standard.engine_model,
          part_number: standard.part_number,
          part_name: standard.part_name,
          measurement_project: standard.measurement_project,
          category: standard.category,
          standard_value: standard.standard_value,
          upper_tolerance: standard.upper_tolerance,
          lower_tolerance: standard.lower_tolerance,
          standard_setter: standard.standard_setter,
          approver: standard.approver,
          measurement_place: standard.measurement_place,
          finish:'No',

          // 用户填写的字段
          urgent_teardown_number: this.urgentTeardownResultForm.urgent_teardown_number,
          send_measurement_person: this.urgentTeardownResultForm.send_measurement_person,
          engine_number: this.urgentTeardownResultForm.engine_number,
          actual_value: '',
          measuring_picture_person: '',
          measurement_date: '',
          file_name: '',
          urgent_teardown_name: this.urgentTeardownResultForm.urgent_teardown_name,
          notes: this.urgentTeardownResultForm.notes || '',
        };

        insertData.push(resultRecord);
      }

      // 在循环外部发送一次请求，批量插入所有数据
      try {
        const result = await this.$request.post('/insertSeveralRowsUrgentTeardownGoodProduct', insertData);

        // 如果未接收到数据，执行用户登录界面
        if (result.code === 401) {
          this.$router.push('UserLogin');
          alert("您未登录，请登录");
          return;
        }

        // 如果成功接收到数据
        if (this.languageS === 'chinese') {
          this.$message.success('插入成功');
        } else if (this.languageS === 'english') {
          this.$message.success('Insert successfully');
        } else if (this.languageS === 'russian') {
          this.$message.success('Успешно вставить');
        }

        // 批量添加数据到表格（使用扩展运算符避免引用问题）
        this.urgentTeardownResultData.push(...insertData);

        // 关闭窗口
        this.sendToMeasureDialog = false;

      } catch (error) {
        console.error('插入失败:', error);
        if (this.languageS === 'chinese') {
          this.$message.error('插入失败');
        } else if (this.languageS === 'english') {
          this.$message.error('Insert failed');
        } else if (this.languageS === 'russian') {
          this.$message.error('Ошибка вставки');
        }
      }
    },
    //处理单选按钮的变化
    handleRadioChange(selectedValue) {
      this.selectEngineModel = selectedValue;
      if (selectedValue) {
        // 选择了具体机型，查询该机型的数据
        this.queryUrgentTeardownStandardOneField('engine_model', selectedValue).then(data => {
          this.filteredUrgentTeardownStandardData = data;
          this.urgentTeardownResultForm.engine_model = selectedValue;
        });
      } else {
        // 没有选择任何机型，显示所有数据
        this.queryUrgentTeardownStandardAll();
        this.urgentTeardownResultForm.engine_model = '';
      }
    },
    //根据一个字段查询检测标准
    async queryUrgentTeardownStandardOneField(fieldName,fieldValue){
      return  this.$request.post('/queryUrgentTeardownStandardOneFieldGoodProduct',{
        fieldName:fieldName,
        fieldValue:fieldValue,
      })
          .then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            } else {
              return result.data
            }
          })
    },
    //根据一个字段查询检测结果
    async queryUrgentTeardownResultOneField(fieldName1,fieldValue1){
      return  this.$request.post('/queryUrgentTeardownResultOneFieldGoodProduct',{
        fieldName1:fieldName1,
        fieldValue1:fieldValue1,
      })
          .then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            } else {
              return result.data
            }
          })
    },

    //辅助函数：查询特急分解检测结果的所有信息
    async queryUrgentTeardownResultAll(){
      return this.$request.post('/queryUrgentTeardownResultAllGoodProduct').then(result=>{
        if(result.code===401){
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //将数据输出到页面表格中
          this.urgentTeardownResultData=result.data
          this.filteredUrgentTeardownResultData=[...this.urgentTeardownResultData]
        }
      })
    },

    //辅助函数：查询油液历史点检数据的当前页数据
    async queryUrgentTeardownResultWithPagination() {
      const { currentPage, pageSize } = this.urgentTeardownResultPagination;
      const response = await this.$request.post('/queryUrgentTeardownResultPaginationGoodProduct', {
        page: currentPage-1,
        size: pageSize,
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.urgentTeardownResultPagination.currentPage-1)*this.urgentTeardownResultPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询油液历史点检数据条目总数
    async queryUrgentTeardownResultQuantity(){
      const response = await this.$request.post('/queryUrgentTeardownResultQuantityGoodProduct');
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    // 处理每页显示条数的变化
    handleSizeChangeUrgentTeardownResult(val) {
      this.urgentTeardownResultPagination.pageSize = val;
      this.urgentTeardownResultPagination.currentPage = 1;

      if (this.isUrgentTeardownResultFiltered && this.currentFilterParams) {
        // 如果当前在筛选状态，使用筛选条件重新查询
        this.queryFilteredUrgentTeardownResult(this.currentFilterParams);
      } else {
        // 否则查询所有数据
        this.queryUrgentTeardownResultWithPagination().then(data => {
          this.urgentTeardownResultData = data;
          this.filteredUrgentTeardownResultData = [...this.urgentTeardownResultData];
        });
      }
    },
    // 处理选择哪页的变化
    handleCurrentChangeUrgentTeardownResult(val) {
      this.urgentTeardownResultPagination.currentPage = val;

      if (this.isUrgentTeardownResultFiltered && this.currentFilterParams) {
        // 如果当前在筛选状态，使用筛选条件重新查询
        this.queryFilteredUrgentTeardownResult(this.currentFilterParams);
      } else {
        // 否则查询所有数据
        this.queryUrgentTeardownResultWithPagination().then(data => {
          this.urgentTeardownResultData = data;
          this.filteredUrgentTeardownResultData = [...this.urgentTeardownResultData];
        });
      }
    },

    handleFilterUrgentTeardownResult() {
      // 构建筛选参数
      const filterParams = {};

      // 只添加非空的筛选条件
      if (this.urgent_teardown_number) {
        filterParams.fieldName1 = 'urgent_teardown_number';
        filterParams.fieldValue1 = this.urgent_teardown_number;
      }
      if (this.finish) {
        filterParams.fieldName2 = 'finish';
        filterParams.fieldValue2 = this.finish;
      }

      // 如果有筛选条件，调用后端接口
      if (Object.keys(filterParams).length > 0) {
        this.isUrgentTeardownResultFiltered = true;
        this.currentFilterParams = filterParams;
        this.queryFilteredUrgentTeardownResult(filterParams);
      } else {
        // 如果没有筛选条件，恢复显示分页数据
        this.resetFilterUrgentTeardownResult();
      }
    },
    // 去后端查询筛选后的数据（分页）
    async queryFilteredUrgentTeardownResult(filterParams) {
      const { currentPage, pageSize } = this.urgentTeardownResultPagination;

      const queryParams = {
        ...filterParams,
        page: currentPage - 1,  // 后端从0开始
        size: pageSize
      };

      const result = await this.$request.post('/queryUrgentTeardownResultByDynamicConditionsGoodProduct', queryParams);
      if (result.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
        return;
      }

      // 更新数据和分页信息
      this.filteredUrgentTeardownResultData = result.data.data;
      this.urgentTeardownResultPagination.total = result.data.total;

      // 为数据添加序号
      for (let i = 0; i < this.filteredUrgentTeardownResultData.length; i++) {
        this.filteredUrgentTeardownResultData[i].indexUse = (currentPage - 1) * pageSize + i + 1;
      }

      this.componentKey++;
    },
    // 重置筛选条件
    async resetFilterUrgentTeardownResult() {
      this.urgent_teardown_number = '';
      this.finish = '';
      this.isUrgentTeardownResultFiltered = false;
      this.currentFilterParams = null;

      // 重新加载分页数据
      this.urgentTeardownResultPagination.currentPage = 1;
      const data = await this.queryUrgentTeardownResultWithPagination();
      this.urgentTeardownResultData = data;
      this.filteredUrgentTeardownResultData = [...this.urgentTeardownResultData];

      // 获取总数
      const total = await this.queryUrgentTeardownResultQuantity();
      this.urgentTeardownResultPagination.total = total;

      this.componentKey++; // 强制刷新表格
    },

    //根据五个字段查询检测检测结果
    async queryUrgentTeardownResultFiveFields(fieldName1,fieldValue1,fieldName2,fieldValue2,fieldName3,fieldValue3,fieldName4,fieldValue4,fieldName5,fieldValue5,){
      return  this.$request.post('/queryUrgentTeardownResultFiveFieldsGoodProduct',{
        fieldName1:fieldName1,
        fieldValue1:fieldValue1,
        fieldName2:fieldName2,
        fieldValue2:fieldValue2,
        fieldName3:fieldName3,
        fieldValue3:fieldValue3,
        fieldName4:fieldName4,
        fieldValue4:fieldValue4,
        fieldName5:fieldName5,
        fieldValue5:fieldValue5,
      })
          .then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            } else {
              return result.data
            }
          })
    },
    //显示编辑特急分解检测结果的弹窗，doe 1：编辑
    urgentTeardownResultEditShow(doe,scope){
      this.urgentTeardownResultDoe=doe
      this.urgentTeardownResultScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在修改一条特急分解检测结果'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are editing one line of Urgent Teardown Measurement Result'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='Вы редактируете одну строку неотложного результата измерения разрыва'
        }
        //给表单赋值
        this.urgentTeardownResultForm=_.cloneDeep(scope.row)
        if (this.urgentTeardownResultForm.category==='检测/Measuring/Измерение'){
          //控制弹窗打开
          this.urgentTeardownResultMeasureDialog=true
        }
        else if (this.urgentTeardownResultForm.category==='拍照/Take photos/Снимайте фотографии'){
          this.imageUrl = ''
          // 如果已有文件名，显示预览
          if (this.urgentTeardownResultForm.file_name) {
            this.imageUrl = `http://10.255.96.48:3499/russiaEngine/${this.urgentTeardownResultForm.file_name}` // 根据实际接口调整
          }
          //控制弹窗打开
          this.urgentTeardownResultPictureDialog=true
        }
      }
    },
    urgentTeardownResultOk(){
      //当编辑某一行时
      if (this.urgentTeardownResultDoe===1){
        if (this.urgentTeardownResultForm.category==='检测/Measuring/Измерение'){
          this.$request.post('/editUrgentTeardownResultGoodProduct',this.urgentTeardownResultForm).then(result=>{
            //如果未接收到数据，执行用户登录界面
            if (result.code===401){
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            //如果成功接收到数据，在控制台打印数据并提示编辑成功
            else{
              if (this.languageS==='chinese'){
                this.$message.success('编辑成功')
              }
              else if (this.languageS==='english'){
                this.$message.success('Edit successfully')
              }
              else if (this.languageS==='russian'){
                this.$message.success('Редактировать успешно')
              }
              //修改大表数据
              this.urgentTeardownResultData.splice(this.urgentTeardownResultScope.$index,1,this.urgentTeardownResultForm)

              //关闭窗口
              this.urgentTeardownResultMeasureDialog=false
            }
          })
        }
        else if (this.urgentTeardownResultForm.category==='拍照/Take photos/Снимайте фотографии'){
          this.$request.post('/editUrgentTeardownResultGoodProduct',this.urgentTeardownResultForm).then(result=>{
            //如果未接收到数据，执行用户登录界面
            if (result.code===401){
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            }
            //如果成功接收到数据，在控制台打印数据并提示编辑成功
            else{
              if (this.languageS==='chinese'){
                this.$message.success('编辑成功')
              }
              else if (this.languageS==='english'){
                this.$message.success('Edit successfully')
              }
              else if (this.languageS==='russian'){
                this.$message.success('Редактировать успешно')
              }
              //修改大表数据
              this.urgentTeardownResultData.splice(this.urgentTeardownResultScope.$index,1,this.urgentTeardownResultForm)

              //关闭窗口
              this.urgentTeardownResultPictureDialog=false
            }
          })
        }
      }
    },

    //上传特急分解检测结果照片
    beforeAvatarUpload(file) {
      const isJPG = file.type === 'image/jpeg';
      const isPNG = file.type === 'image/png';
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG && !isPNG) {
        this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
      }
      if (!isLt2M) {
        this.$message.error('上传头像图片大小不能超过 2MB!');
      }
      return (isJPG || isPNG) && isLt2M;
    },
    handleAvatarSuccess(res, file) {
      this.imageUrl = URL.createObjectURL(file.raw);
      // 生成文件名
      let fileName=this.generateUUIDv4()+'-'+file.name

      const formData = new FormData()
      formData.append('file', file.raw)
      formData.append('fileName', fileName)
      formData.append('id', this.urgentTeardownResultForm.id)
      console.log(formData)
      this.$requestFile.post('/editUrgentTeardownResultPictureGoodProduct', formData, {
      })
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              alert("您未登录，请登录");
            } else if (result.data === null) {
              alert("程序出现异常，请联系管理员");
            } else {
              console.log("上传成功")
              if (result.data==="保存成功"){
                this.urgentTeardownResultData[this.urgentTeardownResultScope.$index].file_name=fileName
                this.urgentTeardownResultForm.file_name = fileName;
              }
            }
          })
          .catch(error => {
            console.error('文件上传失败:', error);
            this.$message.error('文件上传失败，请重试');
          });
    },

    //批量上传特急分解检测结果
    //特急分解编号发生变化时(上传检测结果弹窗)
    handleUrgentTeardownNumberChange(selectedValue) {
      this.urgentTeardownNumber = selectedValue;
      if (selectedValue) {
        this.queryUrgentTeardownResultOneField('urgent_teardown_number', selectedValue).then(data => {
          // 过滤 category 字段为 '检测/Measuring/Измерение' 的数据行
          this.urgentTeardownResultData = data.filter(item =>
              item.category === '检测/Measuring/Измерение'
          );
        });
      } else {
        // 没有选择任何机型，显示所有数据
        this.urgentTeardownResultData = [];
      }
    },
    //当检测人失去焦点的时候，触发的函数：赋值给表格中的检测人
    personEdit(){
      for (let i = 0; i < this.urgentTeardownResultData.length; i++) {
        this.$set(this.urgentTeardownResultData, i, { ...this.urgentTeardownResultData[i], measuring_picture_person: this.urgentTeardownResultForm.measuring_picture_person });
      }
    },
    //当检测日期失去焦点的时候，触发的函数：赋值给表格中的检测日期
    dateEdit(){
      for (let i = 0; i < this.urgentTeardownResultData.length; i++) {
        this.$set(this.urgentTeardownResultData, i, { ...this.urgentTeardownResultData[i], measurement_date: this.urgentTeardownResultForm.measurement_date });
      }
    },
    //上传EXCEL文件成功
    //eslint-disable-next-line no-unused-vars
    handleUploadSuccess(file, fileList) {
      // 处理上传成功逻辑
      const fileToRead = file.raw || null;
      if (!fileToRead) return;

      const reader = new FileReader();
      reader.onload = (e) => {
        // 组合成Json格式
        const data = new Uint8Array(e.target.result);
        const workbook = XLSX.read(data, {type: 'array'});
        const firstSheetName = workbook.SheetNames[0];
        const worksheet = workbook.Sheets[firstSheetName];
        const jsonData = XLSX.utils.sheet_to_json(worksheet, {header: 1});
        // console.log('Excel数据:', jsonData);

        // 创建映射表，用于快速查找
        const excelMap = new Map();

        // 从第二行开始（跳过表头）
        for (let j = 1; j < jsonData.length; j++) {
          const row = jsonData[j];
          if (row && row.length >= 9) {
            const engineModel = String(row[0] || '').trim();        // 机型 - 索引0
            const partNumber = String(row[1] || '').trim();         // 零部件图号 - 索引1
            const measurementProject = String(row[3] || '').trim(); // 检测项目 - 索引3
            const actualValue = row[8];                             // 实测值 - 索引8

            if (engineModel && partNumber && measurementProject) {
              let measurementProjectKey = measurementProject;
              if (measurementProject.includes('|*|')) {
                measurementProjectKey = measurementProject.split('|*|')[0].trim();
              }
              const key = `${engineModel}_${partNumber}_${measurementProjectKey}`;
              excelMap.set(key, actualValue);
              // console.log(`Excel映射: ${key} -> ${actualValue}`);
            }
          }
        }

        // console.log('Excel映射表:', excelMap);

        let matchedCount = 0;
        // 创建深拷贝
        const updatedData = JSON.parse(JSON.stringify(this.urgentTeardownResultData));

        updatedData.forEach((item) => {
          // 获取当前项的匹配键
          let measurementProjectKey = '';
          if (item.measurement_project) {
            if (item.measurement_project.includes('|*|')) {
              measurementProjectKey = item.measurement_project.split('|*|')[0].trim();
            } else {
              measurementProjectKey = item.measurement_project.trim();
            }
          }
          // 构建匹配键：机型_零部件图号_检测项目
          const key = `${item.engine_model}_${item.part_number}_${measurementProjectKey}`;

          // 如果在Excel中找到匹配项，更新实测值
          if (excelMap.has(key)) {
            matchedCount++;
            // console.log(`匹配成功: ${key} -> ${excelMap.get(key)}`);

            // 直接更新对象属性
            item.actual_value = excelMap.get(key);
            item.measuring_picture_person = this.urgentTeardownResultForm.measuring_picture_person;
            item.measurement_date = this.urgentTeardownResultForm.measurement_date;
          }
        });
        // 重新赋值触发响应式
        this.urgentTeardownResultData = updatedData;

        // 显示匹配结果消息
        if (this.languageS === 'chinese') {
          this.$message.success(`文件上传成功，成功匹配 ${matchedCount} 条数据`);
        } else if (this.languageS === 'english') {
          this.$message.success(`File upload successful, ${matchedCount} records matched`);
        } else if (this.languageS === 'russian') {
          this.$message.success(`Загрузка файла успешна, ${matchedCount} записей сопоставлено`);
        }
        // console.log(`总共匹配了 ${matchedCount} 条数据`);
      };
      reader.readAsArrayBuffer(fileToRead);
      // 清空已选文件列表
      this.$refs.excelUpload.clearFiles();
    },
    //上传EXCEL文件失败
    handleUploadError(err, file, fileList) {
      // 处理上传失败逻辑
      console.error('上传失败:', err,file,fileList)
      if (this.languageS==='chinese'){
        this.$message.error('文件上传失败')
      }
      else if (this.languageS==='english'){
        this.$message.error('File upload failed')
      }
      else if (this.languageS==='russian'){
        this.$message.error('Загрузка файла не удалась')
      }
    },
    uploadUrgentTeardownResultShow(){
      if(this.languageS==='chinese'){
        this.titleMessage='您正在上传特急分解检测结果'
      }
      else if(this.languageS==='english'){
        this.titleMessage='You are uploading the measurement results'
      }
      else if(this.languageS==='russian'){
        this.titleMessage='Вы загружаете результаты измерений'
      }
      this.urgentTeardownNumber=''
      this.urgentTeardownResultData=[]
      this.uploadUrgentTeardownResultDialog=true
    },
    uploadUrgentTeardownResultOk(){
      let temp=_.cloneDeep(this.urgentTeardownResultData)
      // 1. 为每条记录添加 finish 字段并赋值为 "No"
      temp.forEach(item => {item.finish = "No"; });

      // 2. 遍历所有行，进行数据校验
      for (let i = 0; i < temp.length; i++) {
        if(temp[i].actual_value==='' ||temp[i].actual_value===undefined || temp[i].actual_value===null){
          temp.splice(i, 1)
        }
        else{
          //校验实测值是否为数值
          if (this.isNumber(temp[i].actual_value)){
            //校验检测日期是否为空
            if (temp[i].measurement_date==='' || temp[i].measurement_date===undefined || temp[i].measurement_date===null){
              if (this.languageS==='chinese'){
                this.$message.warning(`第 ${i + 1} 行：检测日期未填写`)
              }
              else if (this.languageS==='english'){
                this.$message.warning(`Row ${i + 1}: Inspection date not filled`)
              }
              else if (this.languageS==='russian'){
                this.$message.warning(`Строка ${i + 1}: Дата проверки не заполнена`)
              }
              return;
            }
            //校验测量人是否为空
            else{
              if(temp[i].measuring_picture_person==='' || temp[i].measuring_picture_person===undefined || temp[i].measuring_picture_person===null){
                if (this.languageS==='chinese'){
                  this.$message.warning(`第 ${i + 1} 行：测量人未填写`)
                }
                else if (this.languageS==='english'){
                  this.$message.warning(`Row ${i + 1}: Measurer not filled`)
                }
                else if (this.languageS==='russian'){
                  this.$message.warning(`Строка ${i + 1}: Измеритель не заполнен`)
                }
                return;
              }
            }
          }
        }
      }
      // 3. 如果校验通过，提交数据
      this.$request.post('/uploadUrgentTeardownResultGoodProduct', temp).then(result => {
        // console.log('完整响应结果:', result);
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.error("您未登录，请登录");
        }
        else if (result.code === 1) {
          if (this.languageS==='chinese'){
            this.$message.success('保存成功');
          }
          else if (this.languageS==='english'){
            this.$message.success('Save successful')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Сохранить успешно')
          }
          this.queryUrgentTeardownResultAll()
        }
        else {
          if (this.languageS==='chinese'){
            this.$message.error('保存失败，请联系管理员');
          }
          else if (this.languageS==='english'){
            this.$message.error('Save failed, please contact administrator')
          }
          else if (this.languageS==='russian'){
            this.$message.error('Сохранение не удалось, пожалуйста, свяжитесь с администратором')
          }
        }
      });

      // 4. 清空表格数据
      this.urgentTeardownResultData=[]

      // 5. 清空表单选择器
      this.urgentTeardownResultForm.measurement_date = '';
      this.urgentTeardownResultForm.measuring_picture_person = '';
      // 6. 关闭弹窗
      this.uploadUrgentTeardownResultDialog=false
    },
    // 通用:判断是不是数字的函数
    isNumber(value) {
      // 处理空值
      if (value === null || value === undefined || value === '') return false;
      // 去除首尾空格
      value = value.toString().trim();
      // 使用正则表达式检查是否是数字（包括正负数和小数）
      // const regex = /^-?\d+(\.\d+)?$/;
      const regex = /^[+-]?(\d+(\.\d*)?|\.\d+)$/;
      return regex.test(value);
    },

    //特急分解编号发生变化时(分解完成弹窗)
    handleUrgentTeardownNumberChange1(selectedValue) {
      this.urgentTeardownNumber = selectedValue;
      if (selectedValue) {
        this.queryUrgentTeardownResultOneField('urgent_teardown_number', selectedValue).then(data => {
          this.urgentTeardownResultData = data
        });
      } else {
        // 没有选择任何机型，显示所有数据
        this.urgentTeardownResultData = [];
      }
    },
    //当是否完成失去焦点的时候，触发的函数：赋值给表格中的检测人
    finishEdit(){
      for (let i = 0; i < this.urgentTeardownResultData.length; i++) {
        this.$set(this.urgentTeardownResultData, i, { ...this.urgentTeardownResultData[i], finish: this.urgentTeardownResultForm.finish });
      }
    },
    //分解完成弹窗显示
    finishUrgentTeardownResultShow(){
      if(this.languageS==='chinese'){
        this.titleMessage='您正在完结某次特急分解'
      }
      else if(this.languageS==='english'){
        this.titleMessage='You are completing an urgent teardown task'
      }
      else if(this.languageS==='russian'){
        this.titleMessage='Вы выполняете срочную задачу разрушения'
      }
      this.urgentTeardownNumber=''
      this.urgentTeardownResultData=[]
      this.finishUrgentTeardownResultDialog=true
    },
    //分解完成结果提交
    finishUrgentTeardownResultOk(){
      let temp=_.cloneDeep(this.urgentTeardownResultData)
      // 3. 如果校验通过，提交数据
      this.$request.post('/uploadUrgentTeardownResultGoodProduct', temp).then(result => {
        // console.log('完整响应结果:', result);
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.error("您未登录，请登录");
        }
        else if (result.code === 1) {
          if (this.languageS==='chinese'){
            this.$message.success('保存成功');
          }
          else if (this.languageS==='english'){
            this.$message.success('Save successful')
          }
          else if (this.languageS==='russian'){
            this.$message.success('Сохранить успешно')
          }
          this.queryUrgentTeardownResultQuantity().then(data => {
            this.urgentTeardownResultPagination.total = data;
          });
          this.queryUrgentTeardownResultWithPagination().then(data => {
            this.urgentTeardownResultData = data;
            this.filteredUrgentTeardownResultData=[...this.urgentTeardownResultData]
          });
        }
        else {
          if (this.languageS==='chinese'){
            this.$message.error('保存失败，请联系管理员');
          }
          else if (this.languageS==='english'){
            this.$message.error('Save failed, please contact administrator')
          }
          else if (this.languageS==='russian'){
            this.$message.error('Сохранение не удалось, пожалуйста, свяжитесь с администратором')
          }
        }
      });

      // 4. 清空表格数据
      this.urgentTeardownResultData=[]

      // 5. 清空表单选择器
      this.urgentTeardownResultForm.finish = '';
      // 6. 关闭弹窗
      this.finishUrgentTeardownResultDialog=false
    },

    //———————————————————————————————————————————删除——————————————————————————————————————————
    //通用：点击删除按钮时的弹窗
    deleteDataShow(doe,scope){
      this.deleteDataDoe=doe
      if (doe==='deleteMeasuringToolsListOneRow'){
        this.measuringToolsListScope=scope
        this.measuringToolsListForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteMeasuringToolsChecklistOneRow'){
        this.measuringToolChecklistDataScope=scope
        this.measuringToolChecklistForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteCorrectAndPreventOneRow'){
        this.correctAndPreventScope=scope
        this.correctAndPreventForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteQuestionListOneRow'){
        this.questionListScope=scope
        this.questionListForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteFixtureTechnicalConditionOneRow'){
        this.fixtureTechnicalConditionScope=scope
        this.fixtureTechnicalConditionForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteFixtureListOneRow'){
        this.fixtureListScope=scope
        this.fixtureListForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteOilListOneRow'){
        this.oilListScope=scope
        this.oilListForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteHistoricalDataOneRow'){
        this.oilChecklistScope=scope
        this.oilChecklistForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteMinorDefectRecordOneRow'){
        this.minorDefectRecordScope=scope
        this.minorDefectRecordForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
      else if (doe==='deleteUrgentTeardownStandardOneRow'){
        this.urgentTeardownStandardScope=scope
        this.urgentTeardownStandardForm=_.cloneDeep(scope.row)
        if (this.languageS==="chinese"){
          this.titleMessage='删除本行数据'
        }
        else if (this.languageS==="english"){
          this.titleMessage='Delete this row'
        }
        else if (this.languageS==="russian"){
          this.titleMessage='Удалить эту строку'
        }
        this.deleteDataDialog=true
      }
    },
    //通用：删除某一行数据
    deleteDataOk(){
      if (this.deleteDataDoe==='deleteMeasuringToolsListOneRow'){
        //设置删除位的值为1
        this.measuringToolsListForm.sys_deleted=1
        this.$request.post('/editMeasuringToolsListGoodProduct',this.measuringToolsListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.measuringToolsListData.splice(this.measuringToolsListScope.$index,1)
            this.filteredMeasuringToolsListData=[...this.measuringToolsListData]
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteMeasuringToolsChecklistOneRow'){
        //设置删除位的值为1
        this.measuringToolChecklistForm.sys_deleted=1
        this.$request.post('/editMeasuringToolsChecklistGoodProduct',this.measuringToolChecklistForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.measuringToolChecklistData.splice(this.measuringToolChecklistDataScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteCorrectAndPreventOneRow'){
        //设置删除位的值为1
        this.correctAndPreventForm.sys_deleted=1
        this.$request.post('/editCorrectAndPreventGoodProduct',this.correctAndPreventForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.correctAndPreventData.splice(this.correctAndPreventScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteQuestionListOneRow'){
        //设置删除位的值为1
        this.questionListForm.sys_deleted=1
        this.$request.post('/editQuestionListGoodProduct',this.questionListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.questionListData.splice(this.questionListScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteFixtureTechnicalConditionOneRow'){
        //设置删除位的值为1
        this.fixtureTechnicalConditionForm.sys_deleted=1
        this.$request.post('/editFixtureTechConditionGoodProduct',this.fixtureTechnicalConditionForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            // 手动更新分页信息
            this.fixtureTechnicalConditionPagination.total -= 1
            //修改大表数据
            this.fixtureTechnicalConditionData.splice(this.fixtureTechnicalConditionScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteFixtureListOneRow'){
        //设置删除位的值为1
        this.fixtureListForm.sys_deleted=1
        this.$request.post('/editFixtureListGoodProduct',this.fixtureListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.fixtureListData.splice(this.fixtureListScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteOilListOneRow'){
        //设置删除位的值为1
        this.oilListForm.sys_deleted=1
        this.$request.post('/editOilListGoodProduct',this.oilListForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.oilListData.splice(this.oilListScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteHistoricalDataOneRow'){
        //设置删除位的值为1
        this.oilChecklistForm.sys_deleted=1
        this.$request.post('/editOilChecklistGoodProduct',this.oilChecklistForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            // 手动更新分页信息
            this.oilHistoricalDataPagination.total -= 1
            //修改大表数据
            this.oilHistoricalData.splice(this.oilChecklistScope.$index,1)
            this.filteredOilHistoricalData = [...this.oilHistoricalData]
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteMinorDefectRecordOneRow'){
        //设置删除位的值为1
        this.minorDefectRecordForm.sys_deleted=1
        this.$request.post('/editMinorDefectRecordGoodProduct',this.minorDefectRecordForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            // 手动更新分页信息
            this.minorDefectRecordPagination.total -= 1
            //修改大表数据
            this.minorDefectRecordData.splice(this.minorDefectRecordScope.$index,1)
            this.filteredMinorDefectRecordData = [...this.minorDefectRecordData]
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
      else if (this.deleteDataDoe==='deleteUrgentTeardownStandardOneRow'){
        //设置删除位的值为1
        this.urgentTeardownStandardForm.sys_deleted=1
        this.$request.post('/editUrgentTeardownStandardGoodProduct',this.urgentTeardownStandardForm).then(result=>{
          //如果未接收到数据，执行用户登录界面
          if (result.code===401){
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          }
          //如果成功接收到数据，在控制台打印数据并提示编辑成功
          else{
            if (this.languageS==='chinese'){
              this.$message.success('删除成功')
            }
            else if (this.languageS==='english'){
              this.$message.success('Delete successfully')
            }
            else if (this.languageS==='russian'){
              this.$message.success('Успешно удалить')
            }
            //修改大表数据
            this.urgentTeardownStandardData.splice(this.urgentTeardownStandardScope.$index,1)
            //关闭窗口
            this.deleteDataDialog=false
          }
        })
      }
    },

    //——————————————————————————————————————————辅助函数———————————————————————————————————————————
    //辅助函数：组合工装条件中的图纸编号,必须是工装技术条件数组格式
    async drawingNumberOptionList(){
      this.drawingNumberOptions=[]
      const response = await this.$request.post('/queryFixtureDrawingNumberGoodProduct');
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          let temp = response.data[i].drawing_number+'||'
              + response.data[i].engine_model+'||'
              +response.data[i].fixture_name+'||'
              +response.data[i].fixture_name_english+'||'
              +response.data[i].fixture_name_russian
          this.drawingNumberOptions.push({label:response.data[i].drawing_number , value:temp})
        }
        return response.data
      }
    },
    //辅助函数：对零部件信息进行调用,调用所有的信息
    inquiryProductListBaseComponentAll(){
      this.$request.post('/inquiryProductListBaseComponentAll').then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          this.partsListOptions=[]
          for (let i = 0; i < result.data.length; i++) {
            let temp={
              label:result.data[i].cpxh+'/'+result.data[i].lbjmc_C+'/'+result.data[i].lbjmc_E+'/'+result.data[i].lbjmc_R,
              value:result.data[i].cpxh+'/'+result.data[i].lbjmc_C+'/'+result.data[i].lbjmc_E+'/'+result.data[i].lbjmc_R,
            }
            this.partsListOptions.push(temp)
          }
          // 最后，更新 productModelListOption 数组，消除重复项
          this.partsListOptions = [...new Set(this.partsListOptions.map(item => JSON.stringify(item)))]
              .map(itemString => JSON.parse(itemString));
        }
      })
    },

    //—————————————————————————————————————量检具基本信息、点检涉及的筛选—————————————————————————————————————
    //筛选量检具基本信息中的分组
    filterMeasuringToolsList(){
      this.filteredData = this.measuringToolsListData.filter(item=>item.group===this.groupSelect)
    },

    //筛选量检具是否点检中yes的数据,并筛选点检周期
    filterMeasuringToolListIsChecked(isCheckedValue,inspectionFrequencyValue){
      const filteredData = this.measuringToolsListData.filter(tool =>
          tool.is_checked === isCheckedValue &&
          tool.inspection_frequency === inspectionFrequencyValue
      );
      return filteredData
    },
    //计算点检频次为1个月的实际点检情况
    subtractDays(dateString, daysToSubtract) {
      // 1. 将日期字符串转换为 Date 对象
      const date = new Date(dateString);

      // 2. 检查日期是否有效
      if (isNaN(date.getTime())) {
        throw new Error("Invalid date string");
      }

      // 3. 减去指定天数（毫秒计算）
      date.setDate(date.getDate() - daysToSubtract);

      // 4. 格式化为 YYYY-MM-DD 字符串
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份补零
      const day = String(date.getDate()).padStart(2, '0'); // 日期补零

      return [`${year}-${month}-${day} ${'13:00:00'}`,`${dateString} ${'22:30:00'}`];
    },
    //计算点检频次为3个月的实际点检情况
    calculateDaysAfterSubtractingMonths(startDateStr, monthsToSubtract) {
      // 将输入的字符串转换为日期对象
      const startDate = new Date(startDateStr);
      if (isNaN(startDate.getTime())) {
        throw new Error('无效的日期格式，请使用"YYYY-MM-DD"格式');
      }

      // 创建开始日期的副本以避免修改原始日期
      const endDate = new Date(startDate);

      // 减去指定的月数
      endDate.setMonth(endDate.getMonth() - monthsToSubtract);

      // 处理跨年情况（setMonth会自动处理）

      // 计算两个日期之间的毫秒差
      const timeDiff = startDate - endDate;

      // 将毫秒转换为天数
      const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24));

      return daysDiff;
    }
  },

  //—————————————————————————————————————————————————————————————————————————————————————
  //—————————————————————————————————————————————————————————————————————————————————————
  mounted() {
    this.inquiry()
    this.measuringToolsListData=[]
    //组件加载后立即获取并显示列表数据，量检具基本信息
    this.queryMeasuringToolsListAll().then(()=>{
      this.measuringToolChecklistData=[]
      //默认获取当天早班的点检数据
      this.shiftSelect='早班/morning Shift/Ранняя смена'
      const today = new Date();
       setTimeout(() => {
         this.dateSelect = today.toISOString().slice(0, 10);
       }, 100); // 100 毫秒 = 0.1 秒
    })
    //获取零部件列表
    this.inquiryProductListBaseComponentAll()

    // 添加全局键盘事件监听
    this.keyboardHandler = this.handleGlobalKeydown.bind(this);
    window.addEventListener('keydown', this.keyboardHandler);
    //查询所有油液基本信息
    this.queryOilListAll()
    //查询所有特急分解检测标准
    // this.queryUrgentTeardownStandardAll()
    // 查询特急分解检测标准总条目
    this.queryUrgentTeardownStandardQuantity().then(data => {
      this.urgentTeardownStandardPagination.total = data;
    });
    // 查询特急分解检测标准（分页）
    this.queryUrgentTeardownStandardWithPagination().then(data => {
      this.urgentTeardownStandardData = data;
    });
    // 确保用户信息加载完成后再初始化
    this.$nextTick(() => {
      setTimeout(() => {
        this.initOilCheckDefault();
      }, 100);
    });

    this.queryUrgentTeardownResultFiveFields(
      'finish',
      'No',
    ).then(data=>{
      this.urgentTeardownResultData=data
    })
  },

  //—————————————————————————————————————————————————————————————————————————————————————
  //—————————————————————————————————————————————————————————————————————————————————————
  beforeDestroy() {
    // 移除全局键盘事件监听
    if (this.keyboardHandler) {
      window.removeEventListener('keydown', this.keyboardHandler);
    }
  },
}
</script>

<style scoped>
/* 主体左侧的工作步骤栏用到的数据包围的div的样式*/

.el-footer {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  border-left-color: white;
  border-top: white;
}

.el-aside {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  height: 89vh;
}

.el-main {
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-left-color: white;
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  overflow: auto;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.headMain{
  color: #ffffff; /* 设置字体颜色为红色 */
  font-size: 18px;
}
.center-text {
  /* 使用 margin-left 和 margin-right auto 来实现居中效果 */
  margin-left: auto;
  margin-right: auto;
  /* 注意：如果 header 内只有这两个元素，你可能不需要 margin-right: auto */
}
.el-container {
  overflow: auto; /* 自动显示滚动条当内容溢出时 */
  /* 或者 */
  overflow-x: auto; /* 仅水平滚动 */
  overflow-y: auto; /* 仅垂直滚动 */
}
/*自定义样式*/


th, td {
  border: 1px solid #1890ff; /* 蓝色边框 */
  padding: 8px;
  text-align: center;
}
th {
  background-color: #e6f7ff; /* 表头背景色 */
}
/* 自定义标题栏样式 */
.custom-header {
  background-color: #b3cde0;  /* 淡蓝色 */
  color: #000;  /* 标题文字颜色 */
}

/* 修改表格的边框颜色为淡蓝色 */
.el-table th, .el-table td {
  border: 1px solid #b3cde0;  /* 淡蓝色边框 */
}

/* 修改问题清单中问题描述点击样式 */
.clickable-text {
  color: #409EFF;
  cursor: pointer;
  text-decoration: underline;
}
.clickable-text:hover {
  color: #66b1ff;
}
/* 富文本编辑器 */
.editor-container {
  border: 1px solid #ccc;
  height: 342px;
  margin-top: 8px;
}
.editor-container .w-e-text-container {
  height: 100% !important;
  text-align: left !important;
}
.editor-container p {
  text-align: left !important;
}

/* 上传特急分解检测结果照片 */
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>